Activity switch added (#6571)

This commit is contained in:
Bertrand Songis
2019-07-15 22:27:55 +02:00
committed by GitHub
parent cc1196db3d
commit c13a09f707
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -455,6 +455,9 @@ bool getSwitch(swsrc_t swtch, uint8_t flags)
idx = (CONVERT_MODE_TRIMS(idx/2) << 1) + (idx & 1);
result = trimDown(idx);
}
else if (cs_idx == SWSRC_RADIO_ACTIVITY) {
result = (inactivity.counter < 2);
}
else if (cs_idx >= SWSRC_FIRST_SENSOR) {
result = !telemetryItems[cs_idx-SWSRC_FIRST_SENSOR].isOld();
}