diff --git a/companion/src/firmwares/edgetx/yaml_generalsettings.cpp b/companion/src/firmwares/edgetx/yaml_generalsettings.cpp index edc4112e0..ca414042d 100644 --- a/companion/src/firmwares/edgetx/yaml_generalsettings.cpp +++ b/companion/src/firmwares/edgetx/yaml_generalsettings.cpp @@ -279,6 +279,7 @@ Node convert::encode(const GeneralSettings& rhs) node["antennaMode"] = antennaModeLut << rhs.antennaMode; node["pwrOnSpeed"] = rhs.pwrOnSpeed; node["pwrOffSpeed"] = rhs.pwrOffSpeed; + node["disablePwrOnOffHaptic"] = (int)rhs.disablePwrOnOffHaptic; for (int i = 0; i < CPN_MAX_SPECIAL_FUNCTIONS; i++) { const CustomFunctionData& fn = rhs.customFn[i]; @@ -557,6 +558,7 @@ bool convert::decode(const Node& node, GeneralSettings& rhs) node["backlightColor"] >> rhs.backlightColor; node["pwrOnSpeed"] >> rhs.pwrOnSpeed; node["pwrOffSpeed"] >> rhs.pwrOffSpeed; + node["disablePwrOnOffHaptic"] >> rhs.disablePwrOnOffHaptic; if (node["customFn"]) { // decode common for radio GF and model SF and conversion test assumes decoding a model diff --git a/companion/src/firmwares/generalsettings.h b/companion/src/firmwares/generalsettings.h index 80243652d..0ce488b32 100644 --- a/companion/src/firmwares/generalsettings.h +++ b/companion/src/firmwares/generalsettings.h @@ -296,6 +296,7 @@ class GeneralSettings { int pwrOnSpeed; int pwrOffSpeed; + bool disablePwrOnOffHaptic; char selectedTheme[SELECTED_THEME_NAME_LEN + 1]; diff --git a/companion/src/generaledit/generalsetup.cpp b/companion/src/generaledit/generalsetup.cpp index 7845d655f..8df114ccf 100644 --- a/companion/src/generaledit/generalsetup.cpp +++ b/companion/src/generaledit/generalsetup.cpp @@ -289,6 +289,8 @@ ui(new Ui::GeneralSetup) ui->pwrOnDelay->hide(); } + ui->pwrOnOffHaptic_CB->setChecked(!generalSettings.disablePwrOnOffHaptic); // Default is zero=checked + ui->registrationId->setValidator(new NameValidator(board, this)); ui->registrationId->setMaxLength(REGISTRATION_ID_LEN); @@ -642,6 +644,12 @@ void GeneralSetupPanel::on_pwrOffDelay_valueChanged(int) emit modified(); } +void GeneralSetupPanel::on_pwrOnOffHaptic_CB_stateChanged(int) +{ + generalSettings.disablePwrOnOffHaptic = ui->pwrOnOffHaptic_CB->isChecked() ? 0 : 1; + emit modified(); +} + void GeneralSetupPanel::on_beepVolume_SL_valueChanged() { generalSettings.beepVolume=ui->beepVolume_SL->value(); diff --git a/companion/src/generaledit/generalsetup.h b/companion/src/generaledit/generalsetup.h index 80078afd0..01d015308 100644 --- a/companion/src/generaledit/generalsetup.h +++ b/companion/src/generaledit/generalsetup.h @@ -93,6 +93,7 @@ class GeneralSetupPanel : public GeneralPanel void on_pwrOnDelay_valueChanged(int); void on_pwrOffDelay_valueChanged(int); + void on_pwrOnOffHaptic_CB_stateChanged(int); void on_modelQuickSelect_CB_stateChanged(int); void on_startSoundCB_stateChanged(int); diff --git a/companion/src/generaledit/generalsetup.ui b/companion/src/generaledit/generalsetup.ui index 573b10ce8..300e9a997 100644 --- a/companion/src/generaledit/generalsetup.ui +++ b/companion/src/generaledit/generalsetup.ui @@ -20,14 +20,14 @@ Readonly Unlock - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop - QLayout::SetMinimumSize + QLayout::SizeConstraint::SetMinimumSize 0 @@ -47,7 +47,7 @@ SC - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -84,13 +84,13 @@ 0 - Qt::Vertical + Qt::Orientation::Vertical true - QSlider::TicksBothSides + QSlider::TickPosition::TicksBothSides 1 @@ -109,7 +109,7 @@ SE - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -149,13 +149,13 @@ 0 - Qt::Vertical + Qt::Orientation::Vertical true - QSlider::TicksBothSides + QSlider::TickPosition::TicksBothSides 1 @@ -195,13 +195,13 @@ 0 - Qt::Vertical + Qt::Orientation::Vertical true - QSlider::TicksBothSides + QSlider::TickPosition::TicksBothSides 1 @@ -241,13 +241,13 @@ 0 - Qt::Vertical + Qt::Orientation::Vertical true - QSlider::TicksBothSides + QSlider::TickPosition::TicksBothSides 1 @@ -287,13 +287,13 @@ 0 - Qt::Vertical + Qt::Orientation::Vertical true - QSlider::TicksBothSides + QSlider::TickPosition::TicksBothSides 1 @@ -333,13 +333,13 @@ 0 - Qt::Vertical + Qt::Orientation::Vertical true - QSlider::TicksBothSides + QSlider::TickPosition::TicksBothSides 1 @@ -379,13 +379,13 @@ 0 - Qt::Vertical + Qt::Orientation::Vertical true - QSlider::TicksBothSides + QSlider::TickPosition::TicksBothSides 1 @@ -404,7 +404,7 @@ SA - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -420,7 +420,7 @@ SF - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -436,7 +436,7 @@ SH - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -452,7 +452,7 @@ SD - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -468,7 +468,7 @@ SB - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -508,13 +508,13 @@ 0 - Qt::Vertical + Qt::Orientation::Vertical true - QSlider::TicksBothSides + QSlider::TickPosition::TicksBothSides 1 @@ -533,14 +533,14 @@ SG - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::Horizontal + Qt::Orientation::Horizontal @@ -585,7 +585,7 @@ 1 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -608,7 +608,7 @@ 1 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -631,7 +631,7 @@ 1 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -654,7 +654,7 @@ 1 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -885,7 +885,7 @@ p, li { white-space: pre-wrap; } - Qt::Vertical + Qt::Orientation::Vertical @@ -1069,7 +1069,7 @@ p, li { white-space: pre-wrap; } Automatically adjust the radio's clock if a GPS is connected to telemetry. - Qt::RightToLeft + Qt::LayoutDirection::RightToLeft Adjust RTC @@ -1153,7 +1153,7 @@ p, li { white-space: pre-wrap; } 5 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -1272,554 +1272,8 @@ p, li { white-space: pre-wrap; } - QLayout::SetDefaultConstraint + QLayout::SizeConstraint::SetDefaultConstraint - - - - Measurement Units - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Haptic Strength - - - - - - - Jack Mode - - - - - - - GPS Coordinates - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Show Splash Screen on Startup - - - - - - - - 0 - 0 - - - - MAVLink Baud Rate - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> - - - - - - true - - - - - - - - 4800 Baud - - - - - 9600 Baud - - - - - 14400 Baud - - - - - 19200 Baud - - - - - 38400 Baud - - - - - 57600 Baud - - - - - 76800 Baud - - - - - 115200 Baud - - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - - Standard - - - - - Optrex - - - - - - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">LCD Screen Contrast</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Values can be 20-45</span></p></body></html> - - - ms - - - 0 - - - 1000 - - - 10 - - - 0 - - - - - - - - - - - - - Mode selection: - -Mode 1: - Left stick: Elevator, Rudder - Right stick: Throttle, Aileron - -Mode 2: - Left stick: Throttle, Rudder - Right stick: Elevator, Aileron - -Mode 3: - Left stick: Elevator, Aileron - Right stick: Throttle, Rudder - -Mode 4: - Left stick: Throttle, Aileron - Right stick: Elevator, Rudder - - - - - 1 - - - - Mode 1 (RUD ELE THR AIL) - - - - - Mode 2 (RUD THR ELE AIL) - - - - - Mode 3 (AIL ELE THR RUD) - - - - - Mode 4 (AIL THR ELE RUD) - - - - - - - - Hats Mode - - - - - - - - Ask on Connect - - - - - Joystick (HID) - - - - - USB Mass Storage - - - - - USB Serial (CDC) - - - - - - - - - Ask on Connect - - - - - Audio - - - - - Trainer - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Low EEPROM Warning - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Beeper Length - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - "No Sound" Warning - - - - - - - - - - 0 - 0 - - - - - --- - - - - - 2s - - - - - 3s - - - - - 4s - - - - - 6s - - - - - 8s - - - - - 10s - - - - - 15s - - - - - - - - - - PPM Units - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - -2 - - - 2 - - - 1 - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> - - - - - - true - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - - - - - - - Beeper volume - -0 - Quiet. No beeps at all. -1 - No Keys. Normal beeps but menu keys do not beep. -2 - Normal. -3 - Loud. -4 - Extra loud. - - - - Quiet - - - - - Alarms Only - - - - - No Keys - - - - - All - - - - @@ -1856,70 +1310,193 @@ p, li { white-space: pre-wrap; } - - - - - - Min - - - - - - - v - - - 1 - - - 3.000000000000000 - - - 16.000000000000000 - - - 0.100000000000000 - - - 9.000000000000000 - - - - - - - Max - - - - - - - v - - - 1 - - - 3.000000000000000 - - - 16.000000000000000 - - - 0.100000000000000 - - - 12.000000000000000 - - - - + + + + + 0 + 0 + + + + + 0 + 0 + + + + Haptic Strength + + - + + + + Ask on Connect + + + + + Audio + + + + + Trainer + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Inactivity Timer + + + + + + + sec + + + 3 + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Haptic Mode + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Beeper Length + + + + + + + + 0 + 0 + + + + + 0 + 22 + + + + + X-Short + + + + + Short + + + + + Normal + + + + + Long + + + + + X-Long + + + + + + + + Power On Delay + + + + + + + + 0 + 0 + + + + + 20 + 0 + + + + + + + Battery Warning + + + + + + + + 0 + 0 + + + + Play Delay (switch mid position) + + @@ -1970,202 +1547,8 @@ Acceptable values are 3v..12v - - - - - 0 - 0 - - - - - 0 - 0 - - - - Haptic Mode - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - - 16777215 - 16777215 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> - - - - - - true - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - - - - - - - - - - 10 - - - 45 - - - 25 - - - - - - - - - - - - - - Power Off Delay - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - LCD Display Type - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - - X-Short - - - - - Short - - - - - Normal - - - - - Long - - - - - X-Long - - - - - - - - Play Startup Sound - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Inactivity Timer - - - - - + + sec @@ -2215,10 +1598,83 @@ p, li { white-space: pre-wrap; } - - + + + + + 0 + 0 + + + + + 0 + 0 + + - Power On Delay + Beeper Mode + + + + + + + + 0 + 0 + + + + + 0 + 22 + + + + -2 + + + 2 + + + 1 + + + Qt::Orientation::Horizontal + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">LCD Screen Contrast</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Values can be 20-45</span></p></body></html> + + + ms + + + 0 + + + 1000 + + + 10 + + + 0 @@ -2241,153 +1697,7 @@ p, li { white-space: pre-wrap; } - - - - - 0 - 0 - - - - - 20 - 0 - - - - - - - Battery Warning - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - RSSI Poweroff Warning - - - - - - - - 0 - 0 - - - - Play Delay (switch mid position) - - - - - - - sec - - - 3 - - - - - - - USB Mode - - - - - - - - 0 - 0 - - - - Default Channel Order - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Beeper Mode - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - - - Contrast - - - - - - - Stick Mode - - - - - - - - DMS - - - - - NMEA - - - - - + @@ -2523,7 +1833,410 @@ p, li { white-space: pre-wrap; } - + + + + + Ask on Connect + + + + + Joystick (HID) + + + + + USB Mass Storage + + + + + USB Serial (CDC) + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Low EEPROM Warning + + + + + + + USB Mode + + + + + + + + 0 + 0 + + + + + 0 + 22 + + + + + 16777215 + 16777215 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> + + + + + + true + + + + + + + + + + + + + + + 4800 Baud + + + + + 9600 Baud + + + + + 14400 Baud + + + + + 19200 Baud + + + + + 38400 Baud + + + + + 57600 Baud + + + + + 76800 Baud + + + + + 115200 Baud + + + + + + + + + 0 + 0 + + + + + 0 + 22 + + + + + + + + + + Beeper volume + +0 - Quiet. No beeps at all. +1 - No Keys. Normal beeps but menu keys do not beep. +2 - Normal. +3 - Loud. +4 - Extra loud. + + + + Quiet + + + + + Alarms Only + + + + + No Keys + + + + + All + + + + + + + + Power Off Delay + + + + + + + + 0 + 0 + + + + MAVLink Baud Rate + + + + + + + Measurement Units + + + + + + + + + + + + + + Trainer Poweroff Warning + + + + + + + Play Startup Sound + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + Contrast + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + RSSI Poweroff Warning + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + LCD Display Type + + + + + + + GPS Coordinates + + + + + + + + + Min + + + + + + + v + + + 1 + + + 3.000000000000000 + + + 16.000000000000000 + + + 0.100000000000000 + + + 9.000000000000000 + + + + + + + Max + + + + + + + v + + + 1 + + + 3.000000000000000 + + + 16.000000000000000 + + + 0.100000000000000 + + + 12.000000000000000 + + + + + + + + + PPM Units + + + + + + + Stick Mode + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Show Splash Screen on Startup + + + + @@ -2537,6 +2250,103 @@ p, li { white-space: pre-wrap; } + + + + + + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + 1 + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + + + + Hats Mode + + + + + + + + DMS + + + + + NMEA + + + + + + + + 0.-- + + + + 0.-- + + + + + 0.0 + + + + + us + + + + @@ -2568,6 +2378,86 @@ p, li { white-space: pre-wrap; } + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Jack Mode + + + + + + + + 0 + 0 + + + + + 0 + 22 + + + + + + + + + + + + + 10 + + + 45 + + + 25 + + + + + + + + 0 + 0 + + + + + 0 + 22 + + + + + Standard + + + + + Optrex + + + + @@ -2587,53 +2477,211 @@ p, li { white-space: pre-wrap; } + + + + + + + 0 + 0 + + + + + --- + + + + + 2s + + + + + 3s + + + + + 4s + + + + + 6s + + + + + 8s + + + + + 10s + + + + + 15s + + + + + + - - - 0.-- + + + + + + + 0 + 0 + + + + Default Channel Order - - - 0.-- - - - - - 0.0 - - - - - us - - - - - - Qt::Vertical + + + + + 0 + 0 + - + - 20 - 40 + 0 + 0 - - - - - Trainer Poweroff Warning + "No Sound" Warning - + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> + + + + + + true + + + + + + + Power ON/OFF Haptic + + + + + + + + 0 + 0 + + + + + 0 + 22 + + + + + 16777215 + 16777215 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> + + + + + + true + @@ -2641,7 +2689,7 @@ p, li { white-space: pre-wrap; } - Qt::Horizontal + Qt::Orientation::Horizontal @@ -2654,7 +2702,7 @@ p, li { white-space: pre-wrap; } - Qt::Vertical + Qt::Orientation::Vertical diff --git a/radio/src/datastructs_private.h b/radio/src/datastructs_private.h index c96757ca7..b86616f30 100644 --- a/radio/src/datastructs_private.h +++ b/radio/src/datastructs_private.h @@ -970,13 +970,15 @@ PACK(struct RadioData { NOBACKUP(uint8_t disableTrainerPoweroffAlarm:1); + NOBACKUP(uint8_t disablePwrOnOffHaptic:1); + #if defined(COLORLCD) - NOBACKUP(uint8_t space:7 SKIP); + NOBACKUP(uint8_t spare:6 SKIP); #elif LCD_W == 128 uint8_t invertLCD:1; // Invert B&W LCD display - NOBACKUP(uint8_t spare:4 SKIP); + NOBACKUP(uint8_t spare:3 SKIP); #else - NOBACKUP(uint8_t spare:5 SKIP); + NOBACKUP(uint8_t spare:4 SKIP); #endif NOBACKUP(uint8_t getBrightness() const diff --git a/radio/src/gui/128x64/radio_setup.cpp b/radio/src/gui/128x64/radio_setup.cpp index 0e389cddd..1d0f870f3 100644 --- a/radio/src/gui/128x64/radio_setup.cpp +++ b/radio/src/gui/128x64/radio_setup.cpp @@ -93,6 +93,7 @@ enum { ITEM_RADIO_SETUP_START_SOUND, CASE_PWR_BUTTON_PRESS(ITEM_RADIO_SETUP_PWR_ON_SPEED) CASE_PWR_BUTTON_PRESS(ITEM_RADIO_SETUP_PWR_OFF_SPEED) + CASE_HAPTIC(ITEM_RADIO_SETUP_PWR_ON_OFF_HAPTIC) CASE_PXX2(ITEM_RADIO_SETUP_OWNER_ID) CASE_GPS(ITEM_RADIO_SETUP_LABEL_GPS) CASE_GPS(ITEM_RADIO_SETUP_TIMEZONE) @@ -191,6 +192,7 @@ void menuRadioSetup(event_t event) 0, CASE_PWR_BUTTON_PRESS(0) CASE_PWR_BUTTON_PRESS(0) + CASE_HAPTIC(0) // power on/off haptic CASE_PXX2(0) /* owner registration ID */ CASE_GPS(0) @@ -597,6 +599,16 @@ void menuRadioSetup(event_t event) break; #endif +#if defined(HAPTIC) + case ITEM_RADIO_SETUP_PWR_ON_OFF_HAPTIC: { + lcdDrawTextAlignedLeft(y, STR_PWR_ON_OFF_HAPTIC); + g_eeGeneral.disablePwrOnOffHaptic = + !editCheckBox(!g_eeGeneral.disablePwrOnOffHaptic, LCD_W - 9, y, + nullptr, attr, event); + break; + } +#endif + #if defined(PXX2) case ITEM_RADIO_SETUP_OWNER_ID: lcdDrawTextAlignedLeft(y, STR_OWNER_ID); diff --git a/radio/src/gui/212x64/radio_setup.cpp b/radio/src/gui/212x64/radio_setup.cpp index 5fcc251bd..bab0d80f1 100644 --- a/radio/src/gui/212x64/radio_setup.cpp +++ b/radio/src/gui/212x64/radio_setup.cpp @@ -82,6 +82,7 @@ enum MenuRadioSetupItems { ITEM_RADIO_SETUP_START_SOUND, CASE_PWR_BUTTON_PRESS(ITEM_RADIO_SETUP_PWR_ON_SPEED) CASE_PWR_BUTTON_PRESS(ITEM_RADIO_SETUP_PWR_OFF_SPEED) + CASE_HAPTIC(ITEM_RADIO_SETUP_PWR_ON_OFF_HAPTIC) #if defined(PXX2) ITEM_RADIO_SETUP_OWNER_ID, #endif @@ -194,6 +195,7 @@ void menuRadioSetup(event_t event) 0, CASE_PWR_BUTTON_PRESS(0) // pwr on speed CASE_PWR_BUTTON_PRESS(0) // pwr off speed + CASE_HAPTIC(0) // power on/off haptic CASE_PXX2(0) // owner registration ID CASE_GPS(LABEL(GPS)) CASE_GPS(0) // timezone @@ -561,6 +563,16 @@ void menuRadioSetup(event_t event) break; #endif +#if defined(HAPTIC) + case ITEM_RADIO_SETUP_PWR_ON_OFF_HAPTIC: { + lcdDrawTextAlignedLeft(y, STR_PWR_ON_OFF_HAPTIC); + g_eeGeneral.disablePwrOnOffHaptic = + !editCheckBox(!g_eeGeneral.disablePwrOnOffHaptic, + RADIO_SETUP_2ND_COLUMN, y, nullptr, attr, event); + break; + } +#endif + #if defined(GPS) case ITEM_RADIO_SETUP_LABEL_GPS: lcdDrawTextAlignedLeft(y, STR_GPS); diff --git a/radio/src/gui/colorlcd/radio_setup.cpp b/radio/src/gui/colorlcd/radio_setup.cpp index e8304cb0c..c2ccfa092 100644 --- a/radio/src/gui/colorlcd/radio_setup.cpp +++ b/radio/src/gui/colorlcd/radio_setup.cpp @@ -769,6 +769,15 @@ static SetupLineDef setupLines[] = { } }, #endif +#if defined(HAPTIC) + { + // Power on/off haptic alarm + STR_PWR_ON_OFF_HAPTIC, + [](Window* parent, coord_t x, coord_t y) { + new ToggleSwitch(parent, {x, y, 0, EdgeTxStyles::UI_ELEMENT_HEIGHT}, GET_SET_INVERTED(g_eeGeneral.disablePwrOnOffHaptic)); + } + }, +#endif #if defined(PXX2) { // Owner ID diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 218fe4447..3937ea79a 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1259,7 +1259,8 @@ void runStartupAnimation() isPowerOn = true; pwrOn(); #if defined(HAPTIC) - if (g_eeGeneral.hapticMode != e_mode_quiet) + if (!g_eeGeneral.disablePwrOnOffHaptic && + (g_eeGeneral.hapticMode != e_mode_quiet)) haptic.play(15, 3, PLAY_NOW); #endif } @@ -1373,7 +1374,8 @@ void edgeTxInit() #else // defined(STARTUP_ANIMATION) pwrOn(); #if defined(HAPTIC) - if (g_eeGeneral.hapticMode != e_mode_quiet) + if (!g_eeGeneral.disablePwrOnOffHaptic && + (g_eeGeneral.hapticMode != e_mode_quiet)) haptic.play(15, 3, PLAY_NOW); #endif #endif @@ -1771,7 +1773,8 @@ uint32_t pwrCheck() } #if defined(HAPTIC) - if (g_eeGeneral.hapticMode != e_mode_quiet) + if (!g_eeGeneral.disablePwrOnOffHaptic && + (g_eeGeneral.hapticMode != e_mode_quiet)) haptic.play(15, 3, PLAY_NOW); #endif pwr_check_state = PWR_CHECK_OFF; diff --git a/radio/src/storage/yaml/yaml_datastructs_128x64.cpp b/radio/src/storage/yaml/yaml_datastructs_128x64.cpp index a1274b048..ef61e39d3 100644 --- a/radio/src/storage/yaml/yaml_datastructs_128x64.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_128x64.cpp @@ -358,8 +358,9 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), YAML_UNSIGNED( "invertLCD", 1 ), - YAML_PADDING( 4 ), + YAML_PADDING( 3 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_nv14.cpp b/radio/src/storage/yaml/yaml_datastructs_nv14.cpp index 48998a4b3..f231c915d 100644 --- a/radio/src/storage/yaml/yaml_datastructs_nv14.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_nv14.cpp @@ -383,7 +383,8 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), - YAML_PADDING( 7 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), + YAML_PADDING( 6 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_pl18.cpp b/radio/src/storage/yaml/yaml_datastructs_pl18.cpp index ffb509f97..29eec76c0 100644 --- a/radio/src/storage/yaml/yaml_datastructs_pl18.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_pl18.cpp @@ -383,7 +383,8 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), - YAML_PADDING( 7 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), + YAML_PADDING( 6 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_t15.cpp b/radio/src/storage/yaml/yaml_datastructs_t15.cpp index 2925365a6..0a9fdbe3a 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t15.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t15.cpp @@ -385,7 +385,8 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), - YAML_PADDING( 7 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), + YAML_PADDING( 6 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_t20.cpp b/radio/src/storage/yaml/yaml_datastructs_t20.cpp index 07f92b0e1..f9eb4df2f 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t20.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t20.cpp @@ -358,8 +358,9 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), YAML_UNSIGNED( "invertLCD", 1 ), - YAML_PADDING( 4 ), + YAML_PADDING( 3 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_tpro.cpp b/radio/src/storage/yaml/yaml_datastructs_tpro.cpp index d32bd2882..0e7cee8b1 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tpro.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tpro.cpp @@ -358,8 +358,9 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), YAML_UNSIGNED( "invertLCD", 1 ), - YAML_PADDING( 4 ), + YAML_PADDING( 3 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x10.cpp b/radio/src/storage/yaml/yaml_datastructs_x10.cpp index 1ace89129..973927677 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x10.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x10.cpp @@ -385,7 +385,8 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), - YAML_PADDING( 7 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), + YAML_PADDING( 6 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x12s.cpp b/radio/src/storage/yaml/yaml_datastructs_x12s.cpp index 1ace89129..973927677 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x12s.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x12s.cpp @@ -385,7 +385,8 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), - YAML_PADDING( 7 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), + YAML_PADDING( 6 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp index 3ff4ded28..0113c7d38 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp @@ -357,7 +357,8 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), - YAML_PADDING( 5 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), + YAML_PADDING( 4 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp index 01576ffec..1dafe9b6a 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp @@ -358,7 +358,8 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), - YAML_PADDING( 5 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), + YAML_PADDING( 4 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp index c4399f9ce..16c389c8e 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp @@ -361,8 +361,9 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ), YAML_UNSIGNED( "modelTelemetryDisabled", 1 ), YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ), + YAML_UNSIGNED( "disablePwrOnOffHaptic", 1 ), YAML_UNSIGNED( "invertLCD", 1 ), - YAML_PADDING( 4 ), + YAML_PADDING( 3 ), YAML_END }; static const struct YamlNode struct_unsigned_8[] = { diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 5619fd383..aa77900e9 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -829,8 +829,12 @@ const char STR_BEEP_PITCH[] = TR_BEEP_PITCH; #endif #if defined(HAPTIC) +const char STR_PWR_ON_OFF_HAPTIC[] = TR_PWR_ON_OFF_HAPTIC; const char STR_HAPTIC_LABEL[] = TR_HAPTIC_LABEL; const char STR_STRENGTH[] = TR_STRENGTH; +#endif + +#if defined(IMU) const char STR_IMU_LABEL[] = TR_IMU_LABEL; const char STR_IMU_OFFSET[] = TR_IMU_OFFSET; const char STR_IMU_MAX[] = TR_IMU_MAX; diff --git a/radio/src/translations.h b/radio/src/translations.h index 75694f3c8..a0f9408ec 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -377,11 +377,6 @@ extern const char STR_SOUND_LABEL[]; extern const char STR_LENGTH[]; extern const char STR_BEEP_LENGTH[]; extern const char STR_BEEP_PITCH[]; -extern const char STR_HAPTIC_LABEL[]; -extern const char STR_STRENGTH[]; -extern const char STR_IMU_LABEL[]; -extern const char STR_IMU_OFFSET[]; -extern const char STR_IMU_MAX[]; extern const char STR_CONTRAST[]; extern const char STR_ALARMS_LABEL[]; extern const char STR_BATTERY_RANGE[]; @@ -423,6 +418,16 @@ extern const char STR_PWR_ON_DELAY[]; extern const char STR_PWR_OFF_DELAY[]; extern const char* const STR_PWR_OFF_DELAYS[]; #endif +#if defined(HAPTIC) +extern const char STR_PWR_ON_OFF_HAPTIC[]; +extern const char STR_HAPTIC_LABEL[]; +extern const char STR_STRENGTH[]; +#endif +#if defined(IMU) +extern const char STR_IMU_LABEL[]; +extern const char STR_IMU_OFFSET[]; +extern const char STR_IMU_MAX[]; +#endif extern const char STR_THROTTLE_WARNING[]; extern const char STR_CUSTOM_THROTTLE_WARNING[]; extern const char STR_CUSTOM_THROTTLE_WARNING_VAL[]; diff --git a/radio/src/translations/cn.h b/radio/src/translations/cn.h index 358bf84ac..4f2ff7a70 100644 --- a/radio/src/translations/cn.h +++ b/radio/src/translations/cn.h @@ -388,6 +388,7 @@ #define TR_PLAY_HELLO "开机语音" #define TR_PWR_ON_DELAY "开机延迟" #define TR_PWR_OFF_DELAY "关机延迟" +#define TR_PWR_ON_OFF_HAPTIC TR("开关机震动","开关机震动提示") #define TR_THROTTLE_WARNING TR("油门状态", "油门状态") #define TR_CUSTOM_THROTTLE_WARNING TR("自定位置", "自定油门位置?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("位置 %", "油门位置 %") diff --git a/radio/src/translations/cz.h b/radio/src/translations/cz.h index ee375b239..e1b45e1c5 100644 --- a/radio/src/translations/cz.h +++ b/radio/src/translations/cz.h @@ -404,6 +404,7 @@ #define TR_PLAY_HELLO "Zvuk při spuštění" #define TR_PWR_ON_DELAY "Zpoždění zapnutí" #define TR_PWR_OFF_DELAY "Zpoždění vypnutí" +#define TR_PWR_ON_OFF_HAPTIC TR("Zap ON/OFF vibrace","Zapnutí ON/OFF vibrace") #define TR_THROTTLE_WARNING TR("* Plyn", "Kontrola plynu") #define TR_CUSTOM_THROTTLE_WARNING TR("Vlas-Poz", "Vlastní pozice?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Poz. %", "Pozice %") diff --git a/radio/src/translations/da.h b/radio/src/translations/da.h index 8a662608c..6588fe963 100644 --- a/radio/src/translations/da.h +++ b/radio/src/translations/da.h @@ -398,6 +398,7 @@ #define TR_PLAY_HELLO "Startop lyd" #define TR_PWR_ON_DELAY "Forsinkelse ved tænd" #define TR_PWR_OFF_DELAY "Forsinkelse ved sluk" +#define TR_PWR_ON_OFF_HAPTIC TR("Vib. strøm til/fra","Vibrator strøm til/fra") #define TR_THROTTLE_WARNING TR("Gas adv", "Gas advarsel") #define TR_CUSTOM_THROTTLE_WARNING TR("Tilp-Pos", "Tilpasset position?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/de.h b/radio/src/translations/de.h index 1d1f36921..40bdcd6cf 100644 --- a/radio/src/translations/de.h +++ b/radio/src/translations/de.h @@ -395,6 +395,7 @@ #define TR_PLAY_HELLO "Startton abspielen" #define TR_PWR_ON_DELAY "PWR EIN Verzög." #define TR_PWR_OFF_DELAY "PWR AUS Verzög." +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr AN/AUS Haptik","Power AN/AUS Haptik") #define TR_THROTTLE_WARNING TR("Gasalarm", "Gas Alarm") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "Custom position?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/en.h b/radio/src/translations/en.h index 6bc77a9f4..bc7f71196 100644 --- a/radio/src/translations/en.h +++ b/radio/src/translations/en.h @@ -391,6 +391,7 @@ #define TR_PLAY_HELLO "Startup Sound" #define TR_PWR_ON_DELAY "Pwr On delay" #define TR_PWR_OFF_DELAY "Pwr Off delay" +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Haptic","Power ON/OFF Haptic") #define TR_THROTTLE_WARNING TR("T-Warning", "Throttle state") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "Custom position?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/es.h b/radio/src/translations/es.h index f7babb535..19fd22b06 100644 --- a/radio/src/translations/es.h +++ b/radio/src/translations/es.h @@ -391,6 +391,7 @@ #define TR_PLAY_HELLO "Startup Sound" #define TR_PWR_ON_DELAY TR("Atraso On", "Atraso encendido") #define TR_PWR_OFF_DELAY TR("Atraso Off", "Atraso apagado") +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Haptic","Power ON/OFF Haptic") #define TR_THROTTLE_WARNING TR("Aviso-A", "Aviso acelerador") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "Custom position?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/fi.h b/radio/src/translations/fi.h index 8f39c4716..587a01239 100644 --- a/radio/src/translations/fi.h +++ b/radio/src/translations/fi.h @@ -405,6 +405,7 @@ #define TR_PLAY_HELLO "Startup Sound" #define TR_PWR_ON_DELAY "Pwr On delay" #define TR_PWR_OFF_DELAY "Pwr Off delay" +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Haptic","Power ON/OFF Haptic") #define TR_THROTTLE_WARNING TR("T-Warning", "Throttle Warning") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "Custom position?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/fr.h b/radio/src/translations/fr.h index fe449051b..d92a83cdd 100644 --- a/radio/src/translations/fr.h +++ b/radio/src/translations/fr.h @@ -399,7 +399,8 @@ #define TR_PLAY_HELLO "Son de démarrage" #define TR_PWR_ON_DELAY "Délai btn ON" #define TR_PWR_OFF_DELAY "Délai btn OFF" -#define TR_THROTTLE_WARNING TR("Alerte gaz", "Alerte gaz") +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Vibreur","Power ON/OFF Vibreur") +#define TR_THROTTLE_WARNING TR("Alerte gaz", "Alerte gaz") #define TR_CUSTOM_THROTTLE_WARNING TR("Pos. Perso", "Position perso ?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") #define TR_SWITCHWARNING TR("Alerte int", "Pos. Interrupteurs") diff --git a/radio/src/translations/he.h b/radio/src/translations/he.h index cbc197f1b..4543398db 100644 --- a/radio/src/translations/he.h +++ b/radio/src/translations/he.h @@ -397,6 +397,7 @@ #define TR_PLAY_HELLO "צליל אתחול" #define TR_PWR_ON_DELAY "השהיית הפעלה פעיל" #define TR_PWR_OFF_DELAY "משך לחיצה לכיבוי השלט" +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Haptic","Power ON/OFF Haptic") #define TR_THROTTLE_WARNING TR("T-Warning", "התראת מצערת פתוחה") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "עריכת מיקום ידנית") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/it.h b/radio/src/translations/it.h index 451417e5b..9716e3eb6 100644 --- a/radio/src/translations/it.h +++ b/radio/src/translations/it.h @@ -393,6 +393,7 @@ #define TR_PLAY_HELLO "Suono all'accensione" #define TR_PWR_ON_DELAY "Rit. accens." #define TR_PWR_OFF_DELAY "Rit. spegni." +#define TR_PWR_ON_OFF_HAPTIC TR("Vibraz. Pwr ON/OFF","Vibrazione Pwr ON/OFF") #define TR_THROTTLE_WARNING TR("All. Mot.", "Allarme Motore") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "Custom position?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/jp.h b/radio/src/translations/jp.h index 5a120e297..db8716295 100644 --- a/radio/src/translations/jp.h +++ b/radio/src/translations/jp.h @@ -392,6 +392,7 @@ #define TR_PLAY_HELLO "起動時サウンド" #define TR_PWR_ON_DELAY "電源ON遅延" #define TR_PWR_OFF_DELAY "電源OFF遅延" +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Haptic","電源 ON/OFF 時のバイブ") #define TR_THROTTLE_WARNING TR("T-Warning", "Throttle状態") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "カスタム位置?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "位置 %") diff --git a/radio/src/translations/nl.h b/radio/src/translations/nl.h index 84ec3b776..f59325716 100644 --- a/radio/src/translations/nl.h +++ b/radio/src/translations/nl.h @@ -391,6 +391,7 @@ #define TR_PLAY_HELLO "Startup Sound" #define TR_PWR_ON_DELAY "Pwr On delay" #define TR_PWR_OFF_DELAY "Pwr Off delay" +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Haptic","Power ON/OFF Haptic") #define TR_THROTTLE_WARNING TR("T-Warning", "Throttle Status") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "Custom position?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/pl.h b/radio/src/translations/pl.h index ea21dd4ee..c8e3ba2ba 100644 --- a/radio/src/translations/pl.h +++ b/radio/src/translations/pl.h @@ -390,6 +390,7 @@ #define TR_PLAY_HELLO "Dźwięk uruchomienia" #define TR_PWR_ON_DELAY "Pwr On delay" #define TR_PWR_OFF_DELAY "Pwr Off delay" +#define TR_PWR_ON_OFF_HAPTIC TR("Wibracja włączania","Wibracja włączania") #define TR_THROTTLE_WARNING TR("OstrzGaz", "OstrzeżenieGaz") #define TR_CUSTOM_THROTTLE_WARNING TR("InnePoł", "Inne położenie?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Poł. %", "Położenie %") diff --git a/radio/src/translations/pt.h b/radio/src/translations/pt.h index 86117633b..9f9709db9 100644 --- a/radio/src/translations/pt.h +++ b/radio/src/translations/pt.h @@ -396,6 +396,7 @@ #define TR_PLAY_HELLO "Som ao ligar" #define TR_PWR_ON_DELAY "Delay para LIGA" #define TR_PWR_OFF_DELAY "Delay para DESL" +#define TR_PWR_ON_OFF_HAPTIC TR("Vibra ao LIG/DESL", "Vibrar ao Lig/Desl") #define TR_THROTTLE_WARNING TR("A-Aceler.", "Pos do acelerador") #define TR_CUSTOM_THROTTLE_WARNING TR("Cust-Pos", "Custom position?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Pos. %", "Position %") diff --git a/radio/src/translations/ru.h b/radio/src/translations/ru.h index 498788ee9..d64d93cac 100644 --- a/radio/src/translations/ru.h +++ b/radio/src/translations/ru.h @@ -395,6 +395,7 @@ #define TR_PLAY_HELLO "Звук запуска" #define TR_PWR_ON_DELAY "Время включ" #define TR_PWR_OFF_DELAY "Время выключ" +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Haptic","Power ON/OFF Haptic") #define TR_THROTTLE_WARNING TR("Г-Предупр", "Статис газа") #define TR_CUSTOM_THROTTLE_WARNING TR("Свое пол", "Свое пол?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Пол. %", "Положение %") diff --git a/radio/src/translations/se.h b/radio/src/translations/se.h index 8d65f3964..45bd3b1e5 100644 --- a/radio/src/translations/se.h +++ b/radio/src/translations/se.h @@ -407,6 +407,7 @@ #define TR_PLAY_HELLO "Startljud" #define TR_PWR_ON_DELAY "Fördröj start" #define TR_PWR_OFF_DELAY "Fördröj avslut" +#define TR_PWR_ON_OFF_HAPTIC TR("Tx AV/PÅ vibr.","Radio AV/PÅ vibration") #define TR_BLCOLOR "Färg" #define TR_THROTTLE_WARNING TR("Gasvarn.", "Gasvarning") #define TR_CUSTOM_THROTTLE_WARNING TR("Egen pos", "Egen position?") diff --git a/radio/src/translations/tw.h b/radio/src/translations/tw.h index ef3c7d5c6..cec30bfa2 100644 --- a/radio/src/translations/tw.h +++ b/radio/src/translations/tw.h @@ -393,6 +393,7 @@ #define TR_PLAY_HELLO "開機語音" #define TR_PWR_ON_DELAY "開機延遲" #define TR_PWR_OFF_DELAY "關機延遲" +#define TR_PWR_ON_OFF_HAPTIC TR("開關機震動","開關機震動提示") #define TR_THROTTLE_WARNING TR("油門狀態", "油門狀態") #define TR_CUSTOM_THROTTLE_WARNING TR("自定位置", "自定油門位置?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("位置 %", "油門位置 %") diff --git a/radio/src/translations/ua.h b/radio/src/translations/ua.h index 6a2c5f661..41c1a9abf 100644 --- a/radio/src/translations/ua.h +++ b/radio/src/translations/ua.h @@ -395,6 +395,7 @@ #define TR_PLAY_HELLO "Звук запуску" #define TR_PWR_ON_DELAY "Pwr On затримка" #define TR_PWR_OFF_DELAY "Pwr Off затримка" +#define TR_PWR_ON_OFF_HAPTIC TR("Pwr ON/OFF Haptic","Power ON/OFF Haptic") #define TR_THROTTLE_WARNING TR("Г-попер.", "Стан Газу") #define TR_CUSTOM_THROTTLE_WARNING TR("Користув. полож.", "Користувацьке положення?") #define TR_CUSTOM_THROTTLE_WARNING_VAL TR("Полож. %", "Положення %")