diff --git a/companion/src/eeprominterface.h b/companion/src/eeprominterface.h index 0684fafd4..1c65c9c5d 100644 --- a/companion/src/eeprominterface.h +++ b/companion/src/eeprominterface.h @@ -1095,7 +1095,8 @@ class GeneralSettings { bool enableTelemetryAlarm; BeeperMode hapticMode; unsigned int stickMode; // TODO enum - int timezone; + int timezone; + bool adjustRTC; bool optrexDisplay; unsigned int inactivityTimer; bool minuteBeep; @@ -1246,7 +1247,6 @@ enum Capability { NoTelemetryProtocol, TelemetryCustomScreens, TelemetryCustomScreensFieldsPerLine, - TelemetryTimeshift, TelemetryMaxMultiplier, HasVario, HasVarioSink, diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index e319a9730..a0531d166 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -3157,7 +3157,12 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo internalField.Append(new UnsignedField<2>(generalData.stickMode)); internalField.Append(new SignedField<5>(generalData.timezone)); - internalField.Append(new SpareBitsField<1>()); + if (version >= 217 && IS_TARANIS(board)) { + internalField.Append(new BoolField<1>(generalData.adjustRTC)); + } + else { + internalField.Append(new SpareBitsField<1>()); + } internalField.Append(new UnsignedField<8>(generalData.inactivityTimer)); if (IS_9X(board) && version >= 215) { diff --git a/companion/src/firmwares/opentx/opentxinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp index 6d506ca1e..48ad71cb7 100644 --- a/companion/src/firmwares/opentx/opentxinterface.cpp +++ b/companion/src/firmwares/opentx/opentxinterface.cpp @@ -689,8 +689,6 @@ int OpenTxFirmware::getCapability(const Capability capability) return IS_TARANIS(board) ? 1 : 0; case TelemetryUnits: return 0; - case TelemetryTimeshift: - return 1; case TelemetryMaxMultiplier: return (IS_ARM(board) ? 32 : 8); case PPMCenter: diff --git a/companion/src/generaledit/generalsetup.cpp b/companion/src/generaledit/generalsetup.cpp index 9fcf2e1c0..ddd982e1a 100644 --- a/companion/src/generaledit/generalsetup.cpp +++ b/companion/src/generaledit/generalsetup.cpp @@ -123,17 +123,16 @@ GeneralSetupPanel::GeneralSetupPanel(QWidget * parent, GeneralSettings & general ui->units_CB->setCurrentIndex(generalSettings.imperial); } - if (!firmware->getCapability(TelemetryTimeshift)) { - ui->label_timezone->hide(); - ui->timezoneSB->hide(); - ui->timezoneSB->setDisabled(true); - ui->gpsFormatCB->hide(); - ui->gpsFormatLabel->hide(); - } - ui->gpsFormatCB->setCurrentIndex(generalSettings.gpsFormat); ui->timezoneSB->setValue(generalSettings.timezone); + if (IS_TARANIS(firmware->getBoard())) { + ui->adjustRTC->setChecked(generalSettings.adjustRTC); + } + else { + ui->adjustRTC->hide(); + } + if (!firmware->getCapability(OptrexDisplay)) { ui->label_displayType->hide(); ui->displayTypeCB->setDisabled(true); @@ -533,6 +532,13 @@ void GeneralSetupPanel::on_timezoneSB_editingFinished() emit modified(); } +void GeneralSetupPanel::on_adjustRTC_stateChanged(int) +{ + generalSettings.adjustRTC = ui->adjustRTC->isChecked(); + emit modified(); +} + + void GeneralSetupPanel::on_inactimerSB_editingFinished() { generalSettings.inactivityTimer = ui->inactimerSB->value(); diff --git a/companion/src/generaledit/generalsetup.h b/companion/src/generaledit/generalsetup.h index 3b72b475d..f884d0062 100644 --- a/companion/src/generaledit/generalsetup.h +++ b/companion/src/generaledit/generalsetup.h @@ -19,7 +19,7 @@ class GeneralSetupPanel : public GeneralPanel private slots: void on_splashScreenChkB_stateChanged(int); void on_splashScreenDuration_currentIndexChanged(int index); - void on_alarmwarnChkB_stateChanged(int ); + void on_alarmwarnChkB_stateChanged(int); void on_gpsFormatCB_currentIndexChanged(int index); void on_displayTypeCB_currentIndexChanged(int index); void on_BLBright_SB_editingFinished(); @@ -29,6 +29,7 @@ class GeneralSetupPanel : public GeneralPanel void on_faimode_CB_stateChanged(int ); void on_speakerPitchSB_editingFinished(); void on_timezoneSB_editingFinished(); + void on_adjustRTC_stateChanged(int); void on_hapticStrength_valueChanged(); void on_soundModeCB_currentIndexChanged(int index); void on_beeperlenCB_currentIndexChanged(int index); diff --git a/companion/src/generaledit/generalsetup.ui b/companion/src/generaledit/generalsetup.ui index cd269787a..156464e5c 100644 --- a/companion/src/generaledit/generalsetup.ui +++ b/companion/src/generaledit/generalsetup.ui @@ -6,101 +6,29 @@ 0 0 - 689 - 606 + 758 + 635 Form - + GPS Coordinates - - - - Speaker Pitch (spkr only) - - - - - - - + Measurement Units - - - - - hh° (N/S) mm' ss''.dd - - - - - NMEA - - - - - - - -14 - - - 12 - - - 0 - - - - - - - Voice Language - - - - - - - Timeshift from UTC - - - - - - - - Metric - - - - - Imperial - - - - - - - - Country Code - - - - @@ -119,6 +47,144 @@ + + + + FAI Mode + + + + + + + Country Code + + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Show splash screen on startup + + + Show splash screen on startup + + + + + + + + + + + 0 + 0 + + + + + --- + + + + + 2s + + + + + 3s + + + + + 4s + + + + + 6s + + + + + 8s + + + + + 10s + + + + + 15s + + + + + + + + + + + hh° (N/S) mm' ss''.dd + + + + + NMEA + + + + + + + + + Metric + + + + + Imperial + + + + + + + + Speaker Pitch (spkr only) + + + + + + + + + + Voice Language + + + @@ -195,6 +261,41 @@ + + + + + 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 + + + @@ -247,7 +348,7 @@ - + Qt::Vertical @@ -1278,41 +1379,6 @@ Acceptable values are 5v..10v - - - - - 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 - - - @@ -1404,85 +1470,6 @@ p, li { white-space: pre-wrap; } - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Show splash screen on startup - - - Show splash screen on startup - - - - - - - - - - - 0 - 0 - - - - - --- - - - - - 2s - - - - - 3s - - - - - 4s - - - - - 6s - - - - - 8s - - - - - 10s - - - - - 15s - - - - - - @@ -1607,19 +1594,6 @@ p, li { white-space: pre-wrap; } - - - - - 0 - 0 - - - - Stick reverse (order as above) - - - @@ -1633,13 +1607,6 @@ p, li { white-space: pre-wrap; } - - - - FAI Mode - - - @@ -1694,38 +1661,6 @@ Mode 4: - - - - - - 1 - - - - - - - 2 - - - - - - - 3 - - - - - - - 4 - - - - - @@ -1862,17 +1797,7 @@ Mode 4: - - - - If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. - - - - - - - + @@ -1885,7 +1810,7 @@ Mode 4: - + @@ -1932,6 +1857,98 @@ p, li { white-space: pre-wrap; } + + + + Timeshift from UTC + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + 0 + 0 + + + + Stick reverse + + + + + + + + + -14 + + + 12 + + + 0 + + + + + + + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. + + + Qt::RightToLeft + + + Adjust RTC + + + + + + + + + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. + + + + + +