Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copter: add and use new afs_mode mode method #28132

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

IamPete1
Copy link
Member

Another extract from #28110. This removes as mode number switch and replaces with a mode method that returns the advanced failsafe mode category.

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amilcarlucas
Copy link
Contributor

Binary Name      Text [B]     Data [B]     BSS (B)      Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  -----------  -----------  -----------  ----------------------------  -------------------------
arducopter       0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      154072
antennatracker   0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      624516
arducopter-heli  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      155024
ardusub          0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      363516
ardurover        0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      305536
blimp            0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      602440
arduplane        0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      156752

@IamPete1
Copy link
Member Author

Binary Name      Text [B]     Data [B]     BSS (B)      Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  -----------  -----------  -----------  ----------------------------  -------------------------
arducopter       0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      154072
antennatracker   0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      624516
arducopter-heli  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      155024
ardusub          0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      363516
ardurover        0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      305536
blimp            0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      602440
arduplane        0 (0.0000%)  0 (0.0000%)  0 (0.0000%)  0 (0.0000%)                                      156752

Advanced failsafe is not enabled by default, hence the 0 cost. For CubeOrange this costs 72 bytes.

@rmackay9
Copy link
Contributor

I can't say that I'm a huge fan of AFS spreading out into the mode library like this. Sorry, I've never liked how it's (not) integrated with our other failsafes so I prefer it be kept separate where possible.

@IamPete1
Copy link
Member Author

I can't say that I'm a huge fan of AFS spreading out into the mode library like this. Sorry, I've never liked how it's (not) integrated with our other failsafes so I prefer it be kept separate where possible.

Yeah, its not great. But to enable custom modes we have to remove all switches using mode numbers. Doing it this way means that custom modes will inherit the behavior from guided mode.

@rmackay9 rmackay9 merged commit 20cd9e5 into ArduPilot:master Sep 24, 2024
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants