Skip to content

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Sep 26, 2025

Solved Problem

@sfuhrer found that when you want to handle the case SYS_AUTOSTART is reset to 0 by a user of a PX4-based product you currently cannot do so in the autostart external airframe script rc.autostart_ext because if the parameter has the value 0 that script doesn't even get executed.

Solution

Always run the ROMFS internal and SD card external airframe scripts and handle the case SYS_AUTOSTART is 0 in the same place as any other invalid airframe setup.

This allows catching the SYS_AUTOSTART being reset to 0 in an external airframe script but also emits an error whenever that's not caught e.g. empty Pixhawk board freshly flashed.

Changelog Entry

Handle `SYS_AUTOSTART` 0 the same as no valid airframe being available

Alternatives

Should this be caught in a different way such that the user experience on fresh configured boards stays the same?
I could add that to the condition
🤔

Test coverage

@sfuhrer tested this with an rc.autostart_ext that handles the case SYS_AUTOSTART was reset to 0.
EDIT: I also did some testing, see #25645 (comment)

@MaEtUgR MaEtUgR self-assigned this Sep 26, 2025
sfuhrer and others added 2 commits September 26, 2025 19:17
Do not treat 0 as a magic value that skips the aiframe loading.
Instead leave it tot he rc.autostart to load an airframe that if finds
appropriate (can be defined in external aiframe).

Signed-off-by: Silvan <[email protected]>
@MaEtUgR MaEtUgR force-pushed the maetugr/autostart-0 branch from 2af4b01 to bdf4683 Compare September 26, 2025 17:18
@MaEtUgR MaEtUgR marked this pull request as ready for review September 26, 2025 17:44
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Sep 26, 2025

I tested this with a full reset SYS_AUTOSTART 0 and I like the user experience: You get one error tune followed by the bootup tune and see
image
image
maybe we could add a check with event reporting that explicitly tells the user what's wrong on top but that's out of scope for this pull request.

With SYS_AUTOSTART 4001 everything is as before.

@MaEtUgR MaEtUgR requested a review from dagar September 30, 2025 08:32
@dakejahl dakejahl merged commit 3330176 into main Oct 14, 2025
71 checks passed
@dakejahl dakejahl deleted the maetugr/autostart-0 branch October 14, 2025 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants