1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00
This commit is contained in:
Andre Bernet 2014-04-02 18:27:39 +02:00
parent 38bbde82bf
commit fae5686258
2 changed files with 7 additions and 6 deletions

View file

@ -1252,7 +1252,7 @@ void menuModelSetup(uint8_t event)
case EVT_KEY_LONG(KEY_ENTER): case EVT_KEY_LONG(KEY_ENTER):
killEvents(event); killEvents(event);
if(potMode == 1) { if(potMode == 1) {
g_model.potPosition[m_posHorz-1] = getValue(MIXSRC_FIRST_POT+m_posHorz-1) >> 3; g_model.potPosition[m_posHorz-1] = getValue(MIXSRC_FIRST_POT+m_posHorz-1) >> 4;
AUDIO_WARNING1(); AUDIO_WARNING1();
eeDirty(EE_MODEL); eeDirty(EE_MODEL);
} }

View file

@ -2460,7 +2460,7 @@ void checkSwitches()
perOut(e_perout_mode_normal, 0); perOut(e_perout_mode_normal, 0);
bad_pots = 0; bad_pots = 0;
for (uint8_t i=0; i<NUM_POTS; i++) { for (uint8_t i=0; i<NUM_POTS; i++) {
if (!(g_model.nPotsToWarn & (1 << i)) && (abs(g_model.potPosition[i] - (getValue(MIXSRC_FIRST_POT+i) >> 3)) > 2)) { if (!(g_model.nPotsToWarn & (1 << i)) && (abs(g_model.potPosition[i] - (getValue(MIXSRC_FIRST_POT+i) >> 4)) > 1)) {
warn = true; warn = true;
bad_pots |= (1<<i); bad_pots |= (1<<i);
} }
@ -2506,15 +2506,16 @@ void checkSwitches()
for (uint8_t i=0; i<NUM_POTS; i++) { for (uint8_t i=0; i<NUM_POTS; i++) {
if (!(g_model.nPotsToWarn & (1 << i))) { if (!(g_model.nPotsToWarn & (1 << i))) {
uint8_t flags = 0; uint8_t flags = 0;
if (abs(g_model.potPosition[i] - (calibratedStick[NUM_STICKS+i] >> 3)) > 2) { if (abs(g_model.potPosition[i] - (getValue(MIXSRC_FIRST_POT+i) >> 4)) > 1) {
switch (i) { switch (i) {
case 0: case 0:
case 1: case 1:
lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 3) ? 126 : 127); case 2:
lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 4) ? 126 : 127);
break; break;
case 2:
case 3: case 3:
lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 3) ? '\300' : '\301'); case 4:
lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 4) ? '\300' : '\301');
break; break;
} }
flags = INVERS; flags = INVERS;