From 42153fbb84225dd589c7d82ff3fa2a55304b0eca Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Sun, 9 Jun 2024 11:13:26 +1000 Subject: [PATCH] feat: option to disable power on/off haptic (#5017) --- .../firmwares/edgetx/yaml_generalsettings.cpp | 2 + companion/src/firmwares/generalsettings.h | 1 + companion/src/generaledit/generalsetup.cpp | 8 + companion/src/generaledit/generalsetup.h | 1 + companion/src/generaledit/generalsetup.ui | 1650 +++++++++-------- radio/src/datastructs_private.h | 8 +- radio/src/gui/128x64/radio_setup.cpp | 12 + radio/src/gui/212x64/radio_setup.cpp | 12 + radio/src/gui/colorlcd/radio_setup.cpp | 9 + radio/src/opentx.cpp | 9 +- .../storage/yaml/yaml_datastructs_128x64.cpp | 3 +- .../storage/yaml/yaml_datastructs_nv14.cpp | 3 +- .../storage/yaml/yaml_datastructs_pl18.cpp | 3 +- .../src/storage/yaml/yaml_datastructs_t15.cpp | 3 +- .../src/storage/yaml/yaml_datastructs_t20.cpp | 3 +- .../storage/yaml/yaml_datastructs_tpro.cpp | 3 +- .../src/storage/yaml/yaml_datastructs_x10.cpp | 3 +- .../storage/yaml/yaml_datastructs_x12s.cpp | 3 +- .../src/storage/yaml/yaml_datastructs_x9d.cpp | 3 +- .../src/storage/yaml/yaml_datastructs_x9e.cpp | 3 +- .../storage/yaml/yaml_datastructs_xlites.cpp | 3 +- radio/src/translations.cpp | 4 + radio/src/translations.h | 15 +- radio/src/translations/cn.h | 1 + radio/src/translations/cz.h | 1 + radio/src/translations/da.h | 1 + radio/src/translations/de.h | 1 + radio/src/translations/en.h | 1 + radio/src/translations/es.h | 1 + radio/src/translations/fi.h | 1 + radio/src/translations/fr.h | 3 +- radio/src/translations/he.h | 1 + radio/src/translations/it.h | 1 + radio/src/translations/jp.h | 1 + radio/src/translations/nl.h | 1 + radio/src/translations/pl.h | 1 + radio/src/translations/pt.h | 1 + radio/src/translations/ru.h | 1 + radio/src/translations/se.h | 1 + radio/src/translations/tw.h | 1 + radio/src/translations/ua.h | 1 + 41 files changed, 960 insertions(+), 824 deletions(-) diff --git a/companion/src/firmwares/edgetx/yaml_generalsettings.cpp b/companion/src/firmwares/edgetx/yaml_generalsettings.cpp index edc4112e0c5..ca414042da2 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 80243652dd2..0ce488b32b6 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 7845d655f01..8df114ccf1e 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 80078afd069..01d0153084c 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 573b10ce8b2..300e9a997ce 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,13 +1272,42 @@ p, li { white-space: pre-wrap; } - QLayout::SetDefaultConstraint + QLayout::SizeConstraint::SetDefaultConstraint - - - - Measurement Units + + + + + 0 + 0 + + + + + 0 + 22 + + + + Quiet + + + + + Only Alarms + + + + + No Keys + + + + + All + + @@ -1300,22 +1329,56 @@ p, li { white-space: pre-wrap; } - - + + + + + Ask on Connect + + + + + Audio + + + + + Trainer + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + - Jack Mode + Inactivity Timer - - - - GPS Coordinates + + + + sec + + + 3 - - + + 0 @@ -1329,12 +1392,18 @@ p, li { white-space: pre-wrap; } - Show Splash Screen on Startup + Haptic Mode - - + + + + + 0 + 0 + + 0 @@ -1342,91 +1411,60 @@ p, li { white-space: pre-wrap; } - MAVLink Baud Rate + Beeper Length - - + + - + 0 0 - + - 16777215 - 16777215 + 0 + 22 - - <!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 + X-Short - 38400 Baud + Short - 57600 Baud + Normal - 76800 Baud + Long - 115200 Baud + X-Long - - + + + + Power On Delay + + + + + 0 @@ -1435,24 +1473,45 @@ p, li { white-space: pre-wrap; } - 0 - 22 + 20 + 0 - - - Standard - - - - - Optrex - - + + + + + Battery Warning + - - + + + + + 0 + 0 + + + + Play Delay (switch mid position) + + + + + + + + 0 + 0 + + + + + 0 + 22 + + @@ -1460,174 +1519,87 @@ p, li { white-space: pre-wrap; } - <!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> + Battery warning voltage. +This is the threshold where the battery warning sounds. + +Acceptable values are 3v..12v + + + - ms + V + + + 1 - 0 + 3.000000000000000 - 1000 + 12.000000000000000 - 10 + 0.100000000000000 - 0 + 9.600000000000000 - - - - + + + + sec - - - - - 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 + + 3 - - - 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 + + + + + 0 + 0 + + + + + 0 + 22 + - - - - - - - Ask on Connect - - - - - Joystick (HID) - - - USB Mass Storage + X-Short - USB Serial (CDC) + Short - - - - - Ask on Connect + Normal - Audio + Long - Trainer + X-Long - - - - - 0 - 0 - - - - - 0 - 0 - - - - Low EEPROM Warning - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Beeper Length - - - - - + + 0 @@ -1641,68 +1613,7 @@ Mode 4: - "No Sound" Warning - - - - - - - - - - 0 - 0 - - - - - --- - - - - - 2s - - - - - 3s - - - - - 4s - - - - - 6s - - - - - 8s - - - - - 10s - - - - - 15s - - - - - - - - - - PPM Units + Beeper Mode @@ -1730,47 +1641,45 @@ Mode 4: 1 - Qt::Horizontal + Qt::Orientation::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> +<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 - - true + + 0 + + + 1000 + + + 10 + + + 0 - - + + 0 @@ -1780,9 +1689,16 @@ p, li { white-space: pre-wrap; } 0 - 22 + 0 + + Haptic Length + + + + + @@ -1790,139 +1706,159 @@ p, li { white-space: pre-wrap; } - 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. + <html><head/><body><p>Channel order</p><p><br/></p><p>Defines the order of the default mixes created on a new model.</p></body></html> + + + 0 - Quiet + R E T A - Alarms Only + R E A T - No Keys + R T E A - All + R T A E - - - - - - - 0 - 0 - - - - - 0 - 22 - - - Quiet + R A E T - Only Alarms + R A T E - No Keys + E R T A - All + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R - - + + - - - Min - - + + Ask on Connect + - - - v - - - 1 - - - 3.000000000000000 - - - 16.000000000000000 - - - 0.100000000000000 - - - 9.000000000000000 - - + + Joystick (HID) + - - - Max - - + + USB Mass Storage + - - - v - - - 1 - - - 3.000000000000000 - - - 16.000000000000000 - - - 0.100000000000000 - - - 12.000000000000000 - - + + USB Serial (CDC) + - - - - + - - + + 0 @@ -1932,64 +1868,22 @@ p, li { white-space: pre-wrap; } 0 - 22 + 0 - - - - - - - - Battery warning voltage. -This is the threshold where the battery warning sounds. - -Acceptable values are 3v..12v - - - - - - V - - - 1 - - - 3.000000000000000 - - - 12.000000000000000 - - - 0.100000000000000 - - - 9.600000000000000 + + Low EEPROM Warning - - - - - 0 - 0 - - - - - 0 - 0 - - + + - Haptic Mode + USB Mode - + @@ -2030,40 +1924,6 @@ p, li { white-space: pre-wrap; } - - - - - 0 - 0 - - - - - 0 - 22 - - - - - - - - - - - - - 10 - - - 45 - - - 25 - - - @@ -2071,82 +1931,52 @@ p, li { white-space: pre-wrap; } - - - - Power Off Delay - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - LCD Display Type - - - - - - - - 0 - 0 - - - - - 0 - 22 - - + + - X-Short + 4800 Baud - Short + 9600 Baud - Normal + 14400 Baud - Long + 19200 Baud - X-Long + 38400 Baud + + + + + 57600 Baud + + + + + 76800 Baud + + + + + 115200 Baud - - - - Play Startup Sound - - - - - + + 0 @@ -2156,80 +1986,55 @@ p, li { white-space: pre-wrap; } 0 - 0 + 22 - - Inactivity Timer - - - - - - - sec - - - 3 + + - - - - - - - 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. - X-Short - - - - - Short + Quiet - Normal + Alarms Only - Long + No Keys - X-Long + All - - + + - Power On Delay + Power Off Delay - - - - - 0 - 0 - - + + 0 @@ -2237,12 +2042,40 @@ p, li { white-space: pre-wrap; } - Haptic Length + MAVLink Baud Rate - - + + + + Measurement Units + + + + + + + + + + + + + + Trainer Poweroff Warning + + + + + + + Play Startup Sound + + + + + 0 @@ -2251,19 +2084,19 @@ p, li { white-space: pre-wrap; } - 20 + 0 0 - + - Battery Warning + Contrast - + @@ -2282,70 +2115,110 @@ p, li { white-space: pre-wrap; } - - + + - + 0 0 - - Play Delay (switch mid position) - - - - - - - sec + + + 0 + 0 + - - 3 + + LCD Display Type - - + + - USB Mode + GPS Coordinates - - - - - 0 - 0 - - + + + + + + Min + + + + + + + v + + + 1 + + + 3.000000000000000 + + + 16.000000000000000 + + + 0.100000000000000 + + + 9.000000000000000 + + + + + + + Max + + + + + + + v + + + 1 + + + 3.000000000000000 + + + 16.000000000000000 + + + 0.100000000000000 + + + 12.000000000000000 + + + + + + + - Default Channel Order + PPM Units - - - - - 0 - 0 - - - - - 0 - 0 - - + + - Beeper Mode + Stick Mode - - + + 0 @@ -2358,37 +2231,27 @@ p, li { white-space: pre-wrap; } 0 - - - - - Contrast - - - - - - Stick Mode + Show Splash Screen on Startup - + - DMS + Metric - NMEA + Imperial - + @@ -2396,143 +2259,90 @@ p, li { white-space: pre-wrap; } - <html><head/><body><p>Channel order</p><p><br/></p><p>Defines the order of the default mixes created on a new model.</p></body></html> + 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 + + - 0 + 1 - R E T A - - - - - R E A T - - - - - R T E A - - - - - R T A E - - - - - R A E T - - - - - R A T E - - - - - E R T A - - - - - E R A T - - - - - E T R A - - - - - E T A R - - - - - E A R T - - - - - E A T R - - - - - T R E A - - - - - T R A E - - - - - T E R A - - - - - T E A R - - - - - T A R E - - - - - T A E R + Mode 1 (RUD ELE THR AIL) - A R E T + Mode 2 (RUD THR ELE AIL) - A R T E + Mode 3 (AIL ELE THR RUD) - A E R T + Mode 4 (AIL THR ELE RUD) + + + + + + Hats Mode + + + + + - A E T R + DMS - A T R E + NMEA + + + + + + 0.-- + - A T E R + 0.-- - - - - - Metric + 0.0 - Imperial + us @@ -2568,8 +2378,28 @@ p, li { white-space: pre-wrap; } - - + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Jack Mode + + + + + 0 @@ -2579,61 +2409,279 @@ p, li { white-space: pre-wrap; } 0 - 0 + 22 - - Battery Meter Range + + + + + + + + + + + 10 + + + 45 + + + 25 - - - - 0.-- + + + + + 0 + 0 + + + + + 0 + 22 + - 0.-- + Standard - 0.0 + Optrex + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Battery Meter Range + + + + + - - us - + + + + 0 + 0 + + + + + --- + + + + + 2s + + + + + 3s + + + + + 4s + + + + + 6s + + + + + 8s + + + + + 10s + + + + + 15s + + + + + + + + + + + + + 0 + 0 + + + + Default Channel Order + - - - - 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 c96757ca7a7..b86616f3002 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 0e389cddd35..1d0f870f350 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 5fcc251bd5f..bab0d80f14e 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 e8304cb0c77..c2ccfa092df 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 218fe4447cf..3937ea79adf 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 a1274b0482d..ef61e39d3d7 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 48998a4b375..f231c915dbd 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 ffb509f9779..29eec76c062 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 2925365a6ff..0a9fdbe3adf 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 07f92b0e1d6..f9eb4df2f00 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 d32bd2882e7..0e7cee8b121 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 1ace8912930..973927677a8 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 1ace8912930..973927677a8 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 3ff4ded28f5..0113c7d38db 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 01576ffece7..1dafe9b6af1 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 c4399f9cedb..16c389c8ee1 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 5619fd383eb..aa77900e9bf 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 75694f3c8ad..a0f9408ece4 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 358bf84ac07..4f2ff7a701b 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 ee375b23974..e1b45e1c530 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 8a662608c12..6588fe96384 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 1d1f3692182..40bdcd6cf54 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 6bc77a9f4e4..bc7f711966c 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 f7babb5357a..19fd22b06fc 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 8f39c471611..587a012393f 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 fe449051be8..d92a83cdd7a 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 cbc197f1b69..4543398db04 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 451417e5b64..9716e3eb634 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 5a120e297e5..db87162951c 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 84ec3b776e0..f59325716d9 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 ea21dd4ee86..c8e3ba2ba28 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 86117633b23..9f9709db99b 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 498788ee96f..d64d93cacce 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 8d65f3964a8..45bd3b1e563 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 ef3c7d5c609..cec30bfa2d4 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 6a2c5f66132..41c1a9abfb3 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("Полож. %", "Положення %")