feat: Add facilty for custom throttle warning position (#1395)
* replace magic number for throttle idle with correct define * settings for custom throttle warning position * settings fixed not to break byte-aligment of bit-fields * evaluate custom throttle warning position * add requested throttle value to warning text * comment about field alignment in ModelData struct * Menu for editing custom throttle warning for 128x64 radios Tested on RM TX12 * Improoved menu display * move displayed strings to translation * translation template added for each language * support for 212x64 B&W radios * menu for colorlcd not tested * corrected translation entry for TW * corrected handling of padding bits in ModelData structure * Companion support for custom throttle warning position * Rebase catchup Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
@@ -1489,6 +1489,15 @@ void ModelSetupPage::build(FormWindow * window)
|
||||
new CheckBox(window, grid.getFieldSlot(), GET_SET_INVERTED(g_model.disableThrottleWarning));
|
||||
grid.nextLine();
|
||||
|
||||
// Custom Throttle warning
|
||||
new StaticText(window, grid.getLabelSlot(true), STR_CUSTOM_THROTTLE_WARNING, 0, COLOR_THEME_PRIMARY1);
|
||||
new CheckBox(window, grid.getFieldSlot(), GET_SET_DEFAULT(g_model.enableCustomThrottleWarning));
|
||||
grid.nextLine();
|
||||
// Custom Throttle warning value
|
||||
new StaticText(window, grid.getLabelSlot(true), STR_CUSTOM_THROTTLE_WARNING_VAL, 0, COLOR_THEME_PRIMARY1);
|
||||
new NumberEdit(window, grid.getFieldSlot(), -100, 100, GET_SET_DEFAULT(g_model.customThrottleWarningPosition));
|
||||
grid.nextLine();
|
||||
|
||||
// Switches warning
|
||||
new StaticText(window, grid.getLabelSlot(true), STR_SWITCHWARNING, 0, COLOR_THEME_PRIMARY1);
|
||||
auto group = new FormGroup(window, grid.getFieldSlot(), FORM_BORDER_FOCUS_ONLY | PAINT_CHILDREN_FIRST);
|
||||
|
||||
Reference in New Issue
Block a user