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:
@@ -736,6 +736,8 @@ Node convert<ModelData>::encode(const ModelData& rhs)
|
||||
node["trimInc"] = rhs.trimInc;
|
||||
node["displayTrims"] = rhs.trimsDisplay;
|
||||
node["disableThrottleWarning"] = (int)rhs.disableThrottleWarning;
|
||||
node["enableCustomThrottleWarning"] = (int)rhs.enableCustomThrottleWarning;
|
||||
node["customThrottleWarningPosition"] = (int)rhs.customThrottleWarningPosition;
|
||||
node["beepANACenter"] = rhs.beepANACenter;
|
||||
node["extendedLimits"] = (int)rhs.extendedLimits;
|
||||
node["extendedTrims"] = (int)rhs.extendedTrims;
|
||||
@@ -961,6 +963,8 @@ bool convert<ModelData>::decode(const Node& node, ModelData& rhs)
|
||||
node["trimInc"] >> rhs.trimInc;
|
||||
node["displayTrims"] >> rhs.trimsDisplay;
|
||||
node["disableThrottleWarning"] >> rhs.disableThrottleWarning;
|
||||
node["enableCustomThrottleWarning"] >> rhs.enableCustomThrottleWarning;
|
||||
node["customThrottleWarningPosition"] >> rhs.customThrottleWarningPosition;
|
||||
node["beepANACenter"] >> rhs.beepANACenter;
|
||||
node["extendedLimits"] >> rhs.extendedLimits;
|
||||
node["extendedTrims"] >> rhs.extendedTrims;
|
||||
|
||||
Reference in New Issue
Block a user