Skip to content

Commit

Permalink
fix: consistent display across all UIs
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeerick committed Jul 25, 2024
1 parent 6630de4 commit 59ec872
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion radio/src/gui/128x64/model_custom_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void menuModelCustomScriptOne(event_t event)
scriptInputsOutputs[s_currIdx].outputsCount + 1) {
int outputIdx = i-(ITEM_MODEL_CUSTOMSCRIPT_PARAMS_LABEL+scriptInputsOutputs[s_currIdx].inputsCount)-2;
lcdDrawSizedText(INDENT_WIDTH, y, scriptInputsOutputs[s_currIdx].outputs[outputIdx].name, 10, 0);
lcdDrawNumber(SCRIPT_ONE_2ND_COLUMN_POS, y, calcRESXto100(scriptInputsOutputs[s_currIdx].outputs[outputIdx].value), attr|PREC1|LEFT);
lcdDrawNumber(SCRIPT_ONE_2ND_COLUMN_POS, y, calcRESXto1000(scriptInputsOutputs[s_currIdx].outputs[outputIdx].value), attr|PREC1|LEFT);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/212x64/model_custom_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void menuModelCustomScriptOne(event_t event)

for (int i=0; i<scriptInputsOutputs[s_currIdx].outputsCount; i++) {
drawSource(SCRIPT_ONE_3RD_COLUMN_POS+INDENT_WIDTH, FH+1+FH+i*FH, MIXSRC_FIRST_LUA+(s_currIdx*MAX_SCRIPT_OUTPUTS)+i, 0);
lcdDrawNumber(SCRIPT_ONE_3RD_COLUMN_POS+11*FW+3, FH+1+FH+i*FH, calcRESXto100(scriptInputsOutputs[s_currIdx].outputs[i].value), PREC1|RIGHT);
lcdDrawNumber(SCRIPT_ONE_3RD_COLUMN_POS+11*FW+3, FH+1+FH+i*FH, calcRESXto1000(scriptInputsOutputs[s_currIdx].outputs[i].value), PREC1|RIGHT);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/colorlcd/model_mixer_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class ScriptEditWindow : public Page
COLOR_THEME_PRIMARY1);
lbl->padLeft(PAD_LARGE);
new DynamicNumber<int16_t>(
line, rect_t{}, [=]() { return calcRESXto100(so->value); });
line, rect_t{}, [=]() { return calcRESXto1000(so->value); }, PREC1);
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions radio/src/gui/colorlcd/widgets/value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ class ValueWidget : public Widget
TimerOptions timerOptions;
timerOptions.options = SHOW_TIME;
valueTxt = getTimerString(tme, timerOptions);
#if defined(LUA_INPUTS)
}
else if (field >= MIXSRC_FIRST_LUA && field <= MIXSRC_LAST_LUA) {
valueTxt =
getSourceCustomValueString(field, calcRESXto1000(getValue(field)), valueFlags | PREC1);
#endif
} else {
valueTxt =
getSourceCustomValueString(field, getValue(field), valueFlags);
Expand Down

0 comments on commit 59ec872

Please sign in to comment.