1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-25 17:25:10 +03:00

Rotary encoder refactoring

This commit is contained in:
Bertrand Songis 2019-04-30 14:55:21 +02:00
parent 4f6828aa1c
commit c28210e3e4
60 changed files with 363 additions and 652 deletions

View file

@ -452,16 +452,6 @@ bool getSwitch(swsrc_t swtch, uint8_t flags)
idx = (CONVERT_MODE_TRIMS(idx/2) << 1) + (idx & 1);
result = trimDown(idx);
}
#if ROTARY_ENCODERS > 0
else if (cs_idx == SWSRC_REa) {
result = REA_DOWN();
}
#endif
#if ROTARY_ENCODERS > 1
else if (cs_idx == SWSRC_REb) {
result = REB_DOWN();
}
#endif
else if (cs_idx >= SWSRC_FIRST_SENSOR) {
result = !telemetryItems[cs_idx-SWSRC_FIRST_SENSOR].isOld();
}