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-3.6: check aux switch and mode switch inputs are within range #10216

Merged
merged 2 commits into from Jan 11, 2019

Conversation

Projects
None yet
2 participants
@rmackay9
Copy link
Contributor

rmackay9 commented Jan 10, 2019

This PR helps resolve this issue re the FrSky SBUS receivers in Copter-3.6 (equivalent to this PR on master). The underlying issue is that some channels recover faster than others from a failsafe. In particular we have seen cases where the lower channels recover first but the upper channels (used for auxiliary switches) recover much later. Before the higher channels have recovered they report 874 as their value which can cause the vehicle disarming itself in the air if the arm/disarm function has been attached to the aux switch.

This has been tested in SITL.
sitl-test

rmackay9 added some commits Jan 10, 2019

Copter: do not use out-of-range aux switch values
This protects against FrSky SBUS that can send 874 for some channels even after recovering from a failsafe

@rmackay9 rmackay9 requested a review from peterbarker Jan 10, 2019

@@ -4,13 +4,13 @@

//Documentation of Aux Switch Flags:
struct {
uint8_t CH6_flag : 2; // 0, 1 // ch6 aux switch : 0 is low or false, 1 is center or true, 2 is high

This comment has been minimized.

@peterbarker

peterbarker Jan 10, 2019

Contributor

This change looks unrelated?

This comment has been minimized.

@rmackay9

rmackay9 Jan 10, 2019

Contributor

@peterbarker, I had to do that actually or the read_3pos_switch wouldn't accept the .CH6_flag as an argument.

Txs for reviewing!

@rmackay9

This comment has been minimized.

Copy link
Contributor

rmackay9 commented Jan 10, 2019

@peterbarker, do you think this looks OK otherwise?

@peterbarker
Copy link
Contributor

peterbarker left a comment

@rmackay9 Looks fine.

@rmackay9 rmackay9 merged commit 45d912b into ArduPilot:Copter-3.6 Jan 11, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details

@rmackay9 rmackay9 deleted the rmackay9:copter36-aux-range-fix branch Jan 11, 2019

@rmackay9

This comment has been minimized.

Copy link
Contributor

rmackay9 commented Jan 11, 2019

@peterbarker. great. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment