[SPORT] Sensor switches + Telemetry switch
This commit is contained in:
+12
-2
@@ -615,14 +615,24 @@ bool getSwitch(swsrc_t swtch)
|
||||
result = REB_DOWN();
|
||||
}
|
||||
#endif
|
||||
#if defined(CPUARM) && defined(FLIGHT_MODES)
|
||||
#if defined(CPUARM)
|
||||
else if (cs_idx >= SWSRC_FIRST_SENSOR) {
|
||||
result = !telemetryItems[cs_idx-SWSRC_FIRST_SENSOR].isOld();
|
||||
}
|
||||
else if (cs_idx == SWSRC_TELEMETRY_STREAMING) {
|
||||
result = TELEMETRY_STREAMING();
|
||||
}
|
||||
else if (cs_idx >= SWSRC_FIRST_FLIGHT_MODE) {
|
||||
#if defined(FLIGHT_MODES)
|
||||
uint8_t idx = cs_idx - SWSRC_FIRST_FLIGHT_MODE;
|
||||
if (flags & GETSWITCH_MIDPOS_DELAY)
|
||||
result = (idx == flightModeTransitionLast);
|
||||
else
|
||||
result = (idx == mixerCurrentFlightMode);
|
||||
}
|
||||
#else
|
||||
result = false;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
cs_idx -= SWSRC_FIRST_LOGICAL_SWITCH;
|
||||
|
||||
Reference in New Issue
Block a user