JianyuWang0623 commented on PR #3751: URL: https://github.com/apache/nuttx-apps/pull/3751#issuecomment-5419547178
@linguini1 @cederom Documentation for the new features is up: apache/nuttx#19971 (draft, `Documentation/applications/system/nxinit/index.rst`). It adds: - **Built-in Properties** section: explains `sys.boot.reason` — it's set automatically by NXInit at boot from `BOARDIOC_RESET_CAUSE` (no app action needed), documents both value forms (`<cause>,<subreason>` for hardware resets, or a single reason string for software resets like `bootloader`/`recovery`/etc.), and covers the two "nothing happens" cases: `CONFIG_BOARDCTL_RESET_CAUSE` disabled (property never set, so matching triggers just never fire) vs. the `boardctl()` call itself failing (NXInit aborts startup). - **Compound Commands** section: documents the `&&`/`||` short-circuit chaining on a single action line, with the quoting caveat. @linguini1 to directly answer your questions from the review: - Apps don't need to call `BOARDIOC_RESET_CAUSE` themselves — NXInit queries it once at startup and sets `sys.boot.reason` before the `boot` event fires. - If `CONFIG_BOARDCTL_RESET_CAUSE` isn't enabled, the property is simply never set, so any trigger referencing it never matches (there's no default/unset value it falls back to). Once apache/nuttx#19971 merges I'll mark it ready for review; happy to adjust wording if you'd like anything phrased differently. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
