feat: Add trainer virtual switch (#3937)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
@@ -603,6 +603,9 @@ bool getSwitch(swsrc_t swtch, uint8_t flags)
|
||||
else if (cs_idx == SWSRC_RADIO_ACTIVITY) {
|
||||
result = (inactivity.counter < 2);
|
||||
}
|
||||
else if (cs_idx == SWSRC_TRAINER_CONNECTED) {
|
||||
result = isTrainerConnected();
|
||||
}
|
||||
else if (cs_idx >= SWSRC_FIRST_SENSOR) {
|
||||
result = !telemetryItems[cs_idx-SWSRC_FIRST_SENSOR].isOld();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user