[Radio] Adjust value limits for mix sources and update UI for LSs, CFs & telem. (#5445)
* [firmware][ARM] Adjust some value limits for mix sources and update editing UI for LSs, CFs, & telem. bars:
* Increase timer limits to +/-8:59:59 when used with LSs, CFs, & bars;
* Increase Lua script output limits to +/-30K;
* Trim limits based on extended limit model setting;
* Limit TX voltage to 25.5;
* Limit TX time comparison value to 29:59m;
* Use proper GVar limits (user-configured), display precision, & unit in LSs & telem. bars;
* Display timer values properly with hours (instead of mmm:ss).
* [firmware] getTimerString() would fail with times >= 100min if hours weren't shown.
* Fix builds w/out GVars.
This commit is contained in:
committed by
Bertrand Songis
parent
716a91fc0c
commit
b69f36afe4
@@ -195,18 +195,18 @@ void menuModelDisplay(event_t event)
|
||||
|
||||
if (IS_BARS_SCREEN(screenIndex)) {
|
||||
FrSkyBarData & bar = g_model.frsky.screens[screenIndex].bars[lineIndex];
|
||||
source_t barSource = bar.source;
|
||||
drawSource(DISPLAY_COL1, y, barSource, menuHorizontalPosition==0 ? attr : 0);
|
||||
int barMax = getMaximumValue(barSource);
|
||||
int barMin = -barMax;
|
||||
if (barSource) {
|
||||
if (barSource <= MIXSRC_LAST_CH) {
|
||||
drawSourceCustomValue(DISPLAY_COL2, y, barSource, calc100toRESX(bar.barMin), (menuHorizontalPosition==1 ? attr : 0) | LEFT);
|
||||
drawSourceCustomValue(DISPLAY_COL3, y, barSource, calc100toRESX(bar.barMax), (menuHorizontalPosition==2 ? attr : 0) | LEFT);
|
||||
drawSource(DISPLAY_COL1, y, bar.source, menuHorizontalPosition==0 ? attr : 0);
|
||||
int16_t barMax, barMin;
|
||||
LcdFlags lf = LEFT;
|
||||
getMixSrcRange(bar.source, barMin, barMax, &lf);
|
||||
if (bar.source) {
|
||||
if (bar.source <= MIXSRC_LAST_CH) {
|
||||
drawSourceCustomValue(DISPLAY_COL2, y, bar.source, calc100toRESX(bar.barMin), (menuHorizontalPosition==1 ? attr : 0) | lf);
|
||||
drawSourceCustomValue(DISPLAY_COL3, y, bar.source, calc100toRESX(bar.barMax), (menuHorizontalPosition==2 ? attr : 0) | lf);
|
||||
}
|
||||
else {
|
||||
drawSourceCustomValue(DISPLAY_COL2, y, barSource, bar.barMin, (menuHorizontalPosition==1 ? attr : 0) | LEFT);
|
||||
drawSourceCustomValue(DISPLAY_COL3, y, barSource, bar.barMax, (menuHorizontalPosition==2 ? attr : 0) | LEFT);
|
||||
drawSourceCustomValue(DISPLAY_COL2, y, bar.source, bar.barMin, (menuHorizontalPosition==1 ? attr : 0) | lf);
|
||||
drawSourceCustomValue(DISPLAY_COL3, y, bar.source, bar.barMax, (menuHorizontalPosition==2 ? attr : 0) | lf);
|
||||
}
|
||||
}
|
||||
else if (attr) {
|
||||
@@ -215,9 +215,9 @@ void menuModelDisplay(event_t event)
|
||||
if (attr && s_editMode>0) {
|
||||
switch (menuHorizontalPosition) {
|
||||
case 0:
|
||||
bar.source = checkIncDec(event, barSource, 0, MIXSRC_LAST_TELEM, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailable);
|
||||
bar.source = checkIncDec(event, bar.source, 0, MIXSRC_LAST_TELEM, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailable);
|
||||
if (checkIncDec_Ret) {
|
||||
if (barSource <= MIXSRC_LAST_CH) {
|
||||
if (bar.source <= MIXSRC_LAST_CH) {
|
||||
bar.barMin = -100;
|
||||
bar.barMax = 100;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user