More cosmetics

This commit is contained in:
Bertrand Songis
2019-07-04 17:38:28 +02:00
parent 74154c5ae7
commit 39c3a151af
30 changed files with 81 additions and 163 deletions
+2 -2
View File
@@ -239,7 +239,7 @@ bool menuModelExpoOne(event_t event)
break;
case EXPO_FIELD_SOURCE:
lcdDrawText(MENUS_MARGIN_LEFT, y, NO_INDENT(STR_SOURCE));
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_SOURCE);
drawSource(EXPO_ONE_2ND_COLUMN, y, ed->srcRaw, menuHorizontalPosition==0 ? attr : 0);
if (attr && menuHorizontalPosition==0) ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isInputSourceAvailable);
if (ed->srcRaw >= MIXSRC_FIRST_TELEM) {
@@ -263,7 +263,7 @@ bool menuModelExpoOne(event_t event)
break;
case EXPO_FIELD_OFFSET:
lcdDrawText(MENUS_MARGIN_LEFT, y, NO_INDENT(STR_OFFSET));
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_OFFSET);
ed->offset = GVAR_MENU_ITEM(EXPO_ONE_2ND_COLUMN, y, ed->offset, -100, 100, LEFT|attr, 0, event);
break;
+2 -2
View File
@@ -203,7 +203,7 @@ bool menuModelMixOne(event_t event)
editName(MIXES_2ND_COLUMN, y, md2->name, sizeof(md2->name), event, attr);
break;
case MIX_FIELD_SOURCE:
lcdDrawText(MENUS_MARGIN_LEFT, y, NO_INDENT(STR_SOURCE));
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_SOURCE);
drawSource(MIXES_2ND_COLUMN, y, md2->srcRaw, attr);
if (attr) CHECK_INCDEC_MODELSOURCE(event, md2->srcRaw, 1, MIXSRC_LAST);
break;
@@ -213,7 +213,7 @@ bool menuModelMixOne(event_t event)
break;
case MIX_FIELD_OFFSET:
{
lcdDrawText(MENUS_MARGIN_LEFT, y, NO_INDENT(STR_OFFSET));
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_OFFSET);
u_int8int16_t offset;
MD_OFFSET_TO_UNION(md2, offset);
offset.word = GVAR_MENU_ITEM(MIXES_2ND_COLUMN, y, offset.word, GV_RANGELARGE_OFFSET_NEG, GV_RANGELARGE_OFFSET, attr|LEFT, 0, event);
+1 -1
View File
@@ -305,7 +305,7 @@ bool menuModelTelemetryFrsky(event_t event)
break;
case ITEM_TELEMETRY_VARIO_SOURCE:
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_SOURCE);
lcdDrawText(MENUS_MARGIN_LEFT, y, INDENT TR_SOURCE);
drawSource(TELEM_COL2, y, g_model.varioData.source ? MIXSRC_FIRST_TELEM+3*(g_model.varioData.source-1) : 0, attr);
if (attr) {
g_model.varioData.source = checkIncDec(event, g_model.varioData.source, 0, MAX_TELEMETRY_SENSORS, EE_MODEL|NO_INCDEC_MARKS, isSensorAvailable);
@@ -181,7 +181,7 @@ bool menuModelSensor(event_t event)
break;
}
else if (sensor->formula == TELEM_FORMULA_TOTALIZE) {
lcdDrawText(MENUS_MARGIN_LEFT, y, NO_INDENT(STR_SOURCE));
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_SOURCE);
drawSource(SENSOR_2ND_COLUMN, y, sensor->consumption.source ? MIXSRC_FIRST_TELEM+3*(sensor->consumption.source-1) : 0, attr);
if (attr) {
sensor->consumption.source = checkIncDec(event, sensor->consumption.source, 0, MAX_TELEMETRY_SENSORS, EE_MODEL|NO_INCDEC_MARKS, isSensorAvailable);
@@ -231,7 +231,7 @@ bool menuModelSensor(event_t event)
break;
}
else {
lcdDrawText(MENUS_MARGIN_LEFT, y, NO_INDENT(STR_OFFSET));
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_OFFSET);
if (attr) sensor->custom.offset = checkIncDec(event, sensor->custom.offset, -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->custom.offset, LEFT|attr);
@@ -244,7 +244,7 @@ bool menuModelSensor(event_t event)
case SENSOR_FIELD_PARAM4:
{
drawStringWithIndex(MENUS_MARGIN_LEFT, y, NO_INDENT(STR_SOURCE), k-SENSOR_FIELD_PARAM1+1);
drawStringWithIndex(MENUS_MARGIN_LEFT, y, STR_SOURCE, k-SENSOR_FIELD_PARAM1+1);
int8_t & source = sensor->calc.sources[k-SENSOR_FIELD_PARAM1];
if (attr) {
source = checkIncDec(event, source, -MAX_TELEMETRY_SENSORS, MAX_TELEMETRY_SENSORS, EE_MODEL|NO_INCDEC_MARKS, isSensorAvailable);