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
-18
View File
@@ -324,16 +324,6 @@ getvalue_t getValue(mixsrc_t i)
}
#endif
#if defined(PCBSKY9X)
else if (i <= MIXSRC_LAST_ROTARY_ENCODER) {
#if ROTARY_ENCODERS > 0
return getRotaryEncoder(i - MIXSRC_REa);
#else
return 0;
#endif
}
#endif
else if (i == MIXSRC_MAX) {
return 1024;
}
@@ -499,14 +489,6 @@ void evalInputs(uint8_t mode)
}
}
#if defined(ROTARY_ENCODERS)
for (uint8_t i=0; i<NUM_ROTARY_ENCODERS; i++) {
if (getRotaryEncoder(i) == 0) {
anaCenter |= ((BeepANACenter)1 << (NUM_STICKS+NUM_POTS+NUM_SLIDERS+NUM_MOUSE_ANALOGS+i));
}
}
#endif
#if NUM_MOUSE_ANALOGS > 0
for (uint8_t i=0; i<NUM_MOUSE_ANALOGS; i++) {
uint8_t ch = NUM_STICKS+NUM_POTS+NUM_SLIDERS+i;