Switches for 9X didn't longer works for Mixers as input

This commit is contained in:
Bertrand Songis
2014-02-11 11:47:03 +01:00
parent 2c60b84258
commit 7a9105dccb
+2 -2
View File
@@ -1245,15 +1245,15 @@ getvalue_t getValue(uint8_t i)
else if (i==MIXSRC_SF) return (switchState(SW_SF0) ? -1024 : 1024);
else if (i==MIXSRC_SG) return (switchState(SW_SG0) ? -1024 : (switchState(SW_SG1) ? 0 : 1024));
else if (i==MIXSRC_SH) return (switchState(SW_SH0) ? -1024 : 1024);
else if (i<=MIXSRC_LAST_CSW) return getSwitch(SWSRC_FIRST_CSW+i-MIXSRC_FIRST_CSW) ? 1024 : -1024;
#else
else if (i==MIXSRC_3POS) return (switchState(SW_ID0) ? -1024 : (switchState(SW_ID1) ? 0 : 1024));
#if defined(EXTRA_3POS)
else if (i==MIXSRC_3POS2) return (switchState(SW_ID3) ? -1024 : (switchState(SW_ID4) ? 0 : 1024));
#endif
else if (i<=MIXSRC_LAST_CSW) return getSwitch(SWSRC_THR+i-MIXSRC_THR) ? 1024 : -1024;
#endif
else if (i<=MIXSRC_LAST_CSW) return getSwitch(SWSRC_FIRST_CSW+i-MIXSRC_FIRST_CSW) ? 1024 : -1024;
else if (i<=MIXSRC_LAST_PPM) { int16_t x = g_ppmIns[i-MIXSRC_FIRST_PPM]; if (i<MIXSRC_FIRST_PPM+NUM_CAL_PPM) { x-= g_eeGeneral.trainer.calib[i-MIXSRC_FIRST_PPM]; } return x*2; }
else if (i<=MIXSRC_LAST_CH) return ex_chans[i-MIXSRC_CH1];