mirror of
https://github.com/opentx/opentx.git
synced 2025-07-12 19:10:19 +03:00
Fix assigning to the wrong member of the union
This commit is contained in:
parent
06217c71a4
commit
25e6f25c54
3 changed files with 3 additions and 3 deletions
|
@ -347,7 +347,7 @@ void menuModelSensor(uint8_t event)
|
|||
else if (sensor->formula == TELEM_FORMULA_CONSTANT) {
|
||||
lcd_putsLeft(y, STR_VALUE);
|
||||
if (attr)
|
||||
sensor->custom.offset = checkIncDec(event, sensor->constant.value, -30000, +30000, EE_MODEL|NO_INCDEC_MARKS|INCDEC_REP10);
|
||||
sensor->constant.value = checkIncDec(event, sensor->constant.value, -30000, +30000, EE_MODEL|NO_INCDEC_MARKS|INCDEC_REP10);
|
||||
if (sensor->prec > 0) attr |= (sensor->prec == 2 ? PREC2 : PREC1);
|
||||
lcdDrawNumber(SENSOR_2ND_COLUMN, y, sensor->constant.value, LEFT|attr);
|
||||
break;
|
||||
|
|
|
@ -261,7 +261,7 @@ bool menuModelSensor(evt_t event)
|
|||
}
|
||||
else if (sensor->formula == TELEM_FORMULA_CONSTANT) {
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_VALUE);
|
||||
if (attr) sensor->custom.offset = checkIncDec(event, sensor->constant.value, -30000, +30000, EE_MODEL|NO_INCDEC_MARKS|INCDEC_REP10);
|
||||
if (attr) sensor->constant.value = checkIncDec(event, sensor->constant.value, -30000, +30000, EE_MODEL|NO_INCDEC_MARKS|INCDEC_REP10);
|
||||
if (sensor->prec > 0) attr |= (sensor->prec == 2 ? PREC2 : PREC1);
|
||||
lcdDrawNumber(SENSOR_2ND_COLUMN, y, sensor->constant.value, LEFT|attr);
|
||||
break;
|
||||
|
|
|
@ -258,7 +258,7 @@ void menuModelSensor(uint8_t event)
|
|||
}
|
||||
else if (sensor->formula == TELEM_FORMULA_CONSTANT) {
|
||||
lcd_putsLeft(y, STR_VALUE);
|
||||
if (attr) sensor->custom.offset = checkIncDec(event, sensor->constant.value, -30000, +30000, EE_MODEL|NO_INCDEC_MARKS|INCDEC_REP10);
|
||||
if (attr) sensor->constant.value = checkIncDec(event, sensor->constant.value, -30000, +30000, EE_MODEL|NO_INCDEC_MARKS|INCDEC_REP10);
|
||||
if (sensor->prec > 0) attr |= (sensor->prec == 2 ? PREC2 : PREC1);
|
||||
lcdDrawNumber(SENSOR_2ND_COLUMN, y, sensor->constant.value, LEFT|attr);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue