Skip to content

Conversation

peterbarker
Copy link
Contributor

  • will make all of the bindtime-value-throttle-failsafe-handling code common between the vehicles
  • will make the RC library stop providing any values when the throttle failsafe triggers
  • read() on the library can start returning false when the throttle value goes below the threshold value meaning no other layer needs to know how the RC receiver is telling us it is unhappy (which can be protocol bit, bind-time values or simply no pulses!)

Still need to do vehicles-other-than-Copter.

@peterbarker peterbarker force-pushed the pr/throttle-failsafe-to-AP_RCProtocol branch 2 times, most recently from 5b903eb to 1659159 Compare October 19, 2025 07:44
@peterbarker
Copy link
Contributor Author

Current formulation has the consequence that the low throttle value causing a low-throttle-value failsafe is never seen via mavlink because we return 'false' in AP_RCProtocol::read now for this situation, so the internal state of RC_Channels is no longer updated. Same is true of the other channels, of course.

@peterbarker peterbarker force-pushed the pr/throttle-failsafe-to-AP_RCProtocol branch from 1659159 to ea8aa24 Compare October 20, 2025 02:05
Copy link
Contributor

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

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

I mean LGTM, but it will require a decent amount of testing since here be dragons...

frontend.set_failsafe_active(false);
}
} else {
if (frontend.throttle_failsafe.counter < 3) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's put the #define back in - makes it easier to review

@peterbarker
Copy link
Contributor Author

I mean LGTM, but it will require a decent amount of testing since here be dragons...

Yep! This is really a rough-cut at the moment to work out whether people are happy with the layering etc etc.

I don't think I'll be pushing this even for 4.7 - it's just too critical.

Another option instead of the call would be to create parameters for the AP_RCProtocol library - which would also fix up the nasty hackery where it "borrows" parameters from RC_Channel!

@peterbarker peterbarker force-pushed the pr/throttle-failsafe-to-AP_RCProtocol branch from ea8aa24 to 62e8a12 Compare October 20, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

2 participants