mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Fix #917
This commit is contained in:
parent
38bbde82bf
commit
fae5686258
2 changed files with 7 additions and 6 deletions
|
@ -1252,7 +1252,7 @@ void menuModelSetup(uint8_t event)
|
|||
case EVT_KEY_LONG(KEY_ENTER):
|
||||
killEvents(event);
|
||||
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();
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
|
|
|
@ -2460,7 +2460,7 @@ void checkSwitches()
|
|||
perOut(e_perout_mode_normal, 0);
|
||||
bad_pots = 0;
|
||||
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;
|
||||
bad_pots |= (1<<i);
|
||||
}
|
||||
|
@ -2506,15 +2506,16 @@ void checkSwitches()
|
|||
for (uint8_t i=0; i<NUM_POTS; i++) {
|
||||
if (!(g_model.nPotsToWarn & (1 << i))) {
|
||||
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) {
|
||||
case 0:
|
||||
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);
|
||||
break;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
flags = INVERS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue