mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 08:45:31 +03:00
Add feature for enabling/disabling profile selection by TX stick command
This commit is contained in:
parent
96c1a780b5
commit
5a4faf5a97
48 changed files with 68 additions and 65 deletions
|
@ -253,15 +253,17 @@ void processRcStickPositions(throttleStatus_e throttleStatus, bool disarm_kill_s
|
|||
#endif
|
||||
|
||||
// Multiple configuration profiles
|
||||
if (rcSticks == THR_LO + YAW_LO + PIT_CE + ROL_LO) // ROLL left -> Profile 1
|
||||
i = 1;
|
||||
else if (rcSticks == THR_LO + YAW_LO + PIT_HI + ROL_CE) // PITCH up -> Profile 2
|
||||
i = 2;
|
||||
else if (rcSticks == THR_LO + YAW_LO + PIT_CE + ROL_HI) // ROLL right -> Profile 3
|
||||
i = 3;
|
||||
if (i) {
|
||||
setConfigProfileAndWriteEEPROM(i - 1);
|
||||
return;
|
||||
if (feature(FEATURE_TX_PROF_SEL)) {
|
||||
if (rcSticks == THR_LO + YAW_LO + PIT_CE + ROL_LO) // ROLL left -> Profile 1
|
||||
i = 1;
|
||||
else if (rcSticks == THR_LO + YAW_LO + PIT_HI + ROL_CE) // PITCH up -> Profile 2
|
||||
i = 2;
|
||||
else if (rcSticks == THR_LO + YAW_LO + PIT_CE + ROL_HI) // ROLL right -> Profile 3
|
||||
i = 3;
|
||||
if (i) {
|
||||
setConfigProfileAndWriteEEPROM(i - 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Save config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue