diff --git a/companion/src/eeprominterface.h b/companion/src/eeprominterface.h index 60b173ae7..37903f939 100644 --- a/companion/src/eeprominterface.h +++ b/companion/src/eeprominterface.h @@ -52,11 +52,12 @@ enum BoardEnum { BOARD_TARANIS_REV4a }; -#define IS_9X(board) (board==BOARD_STOCK || board==BOARD_M128) -#define IS_STOCK(board) (board==BOARD_STOCK) -#define IS_2560(board) (board==BOARD_GRUVIN9X || board==BOARD_MEGA2560) -#define IS_ARM(board) (board==BOARD_SKY9X || board==BOARD_TARANIS || board==BOARD_TARANIS_REV4a || board==BOARD_TARANIS_PLUS) -#define IS_TARANIS(board) (board==BOARD_TARANIS || board==BOARD_TARANIS_REV4a || board==BOARD_TARANIS_PLUS) +#define IS_9X(board) (board==BOARD_STOCK || board==BOARD_M128) +#define IS_STOCK(board) (board==BOARD_STOCK) +#define IS_2560(board) (board==BOARD_GRUVIN9X || board==BOARD_MEGA2560) +#define IS_ARM(board) (board==BOARD_SKY9X || board==BOARD_TARANIS || board==BOARD_TARANIS_REV4a || board==BOARD_TARANIS_PLUS) +#define IS_TARANIS(board) (board==BOARD_TARANIS || board==BOARD_TARANIS_REV4a || board==BOARD_TARANIS_PLUS) +#define IS_TARANIS_PLUS(board) (board==BOARD_TARANIS_PLUS) const uint8_t modn12x3[4][4]= { {1, 2, 3, 4}, diff --git a/companion/src/generaledit.cpp b/companion/src/generaledit.cpp index 5e4cb6c54..b1ceb6803 100644 --- a/companion/src/generaledit.cpp +++ b/companion/src/generaledit.cpp @@ -283,6 +283,16 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) : ui->serialPortMode->hide(); ui->serialPortLabel->hide(); } + + if (IS_TARANIS_PLUS(eepromInterface->getBoard())) { + ui->backlightColor_SL->setValue(g_eeGeneral.backlightColor); + } + else { + ui->backlightColor_label->hide(); + ui->backlightColor_SL->hide(); + ui->backlightColor1_label->hide(); + ui->backlightColor2_label->hide(); + } } GeneralEdit::~GeneralEdit() @@ -486,6 +496,12 @@ void GeneralEdit::on_backlightautoSB_editingFinished() } } +void GeneralEdit::on_backlightColor_SL_valueChanged() +{ + g_eeGeneral.backlightColor = ui->backlightColor_SL->value(); + updateSettings(); +} + void GeneralEdit::on_timezoneSB_editingFinished() { g_eeGeneral.timezone = ui->timezoneSB->value(); diff --git a/companion/src/generaledit.h b/companion/src/generaledit.h index 395adc24c..5fd046de0 100644 --- a/companion/src/generaledit.h +++ b/companion/src/generaledit.h @@ -50,6 +50,7 @@ private slots: void on_tabWidget_currentChanged(int index); void on_displayTypeCB_currentIndexChanged(int index); void on_BLBright_SB_editingFinished(); + void on_backlightColor_SL_valueChanged(); void on_re_CB_currentIndexChanged(int index); void on_countrycode_CB_currentIndexChanged(int index); void on_units_CB_currentIndexChanged(int index); diff --git a/companion/src/generaledit.ui b/companion/src/generaledit.ui index 1b59ef886..fdc220b55 100644 --- a/companion/src/generaledit.ui +++ b/companion/src/generaledit.ui @@ -113,532 +113,7 @@ These will be relevant for all models in the same EEPROM. Setup - - - - - - Country Code - - - - - - - - America - - - - - Japan - - - - - Europe - - - - - - - - - - - - - - - - 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) - - - - - - - - - 4800 Baud - - - - - 9600 Baud - - - - - 14400 Baud - - - - - 19200 Baud - - - - - 38400 Baud - - - - - 57600 Baud - - - - - 76800 Baud - - - - - 115200 Baud - - - - - - - - Haptic Length - - - - - - - - - Beep volume - - - - - - - -2 - - - 2 - - - 1 - - - Qt::Horizontal - - - - - - - Wav volume - - - - - - - -2 - - - 2 - - - 1 - - - Qt::Horizontal - - - - - - - Vario volume - - - - - - - -2 - - - 2 - - - 1 - - - Qt::Horizontal - - - - - - - Background volume - - - - - - - -2 - - - 2 - - - 1 - - - Qt::Horizontal - - - - - - - - - Beeper Length - - - - - - - Vario pitch at zero - - - - - - - MAVLink Baud Rate - - - - - - - - - Voice Language - - - - - - - - - - - - Speaker Volume - - - - - - - Readonly Unlock - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Qt::Vertical - - - - 20 - 5 - - - - - - - - Sound Mode - - - - - - - - 0 - 0 - - - - - - - - - - If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. - - - min - - - 120 - - - - - - - - - - - - - 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 - - - - - - - - - Quiet - - - - - Only Alarms - - - - - No Keys - - - - - All - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Haptic Mode - - - - - - - Stick Mode - - - - - - - - 0 - 0 - - - - Default Channel Order - - - - - - - - Metric - - - - - Imperial - - - - - - - - -14 - - - 12 - - - 0 - - - - - - - - X-Short - - - - - Short - - - - - Normal - - - - - Long - - - - - X-Long - - - - - - - - - Beeper - - - - - Speaker - - - - - BeeperVoice - - - - - SpeakerVoice - - - - - - - - Haptic Strength - - - - - - - FAI Mode - - - - + @@ -674,7 +149,7 @@ Mode 4: - + @@ -810,7 +285,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. @@ -820,7 +295,367 @@ Mode 4: - + + + + + + Color 1 + + + + + + + 255 + + + Qt::Horizontal + + + + + + + Color 2 + + + + + + + + + + + Country Code + + + + + + + + America + + + + + Japan + + + + + Europe + + + + + + + + + + + + + + + + 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) + + + + + + + + Beeper Length + + + + + + + Vario pitch at zero + + + + + + + + + Voice Language + + + + + + + + + + + + Readonly Unlock + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Qt::Vertical + + + + 20 + 5 + + + + + + + + Sound Mode + + + + + + + + + + + + + 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 + + + + + + + + + Quiet + + + + + Only Alarms + + + + + No Keys + + + + + All + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Haptic Mode + + + + + + + Stick Mode + + + + + + + + 0 + 0 + + + + Default Channel Order + + + + + + + + Metric + + + + + Imperial + + + + + + + + -14 + + + 12 + + + 0 + + + + + + + + X-Short + + + + + Short + + + + + Normal + + + + + Long + + + + + X-Long + + + + + + + + + Beeper + + + + + Speaker + + + + + BeeperVoice + + + + + SpeakerVoice + + + + + + + + FAI Mode + + + + @@ -845,39 +680,13 @@ Mode 4: - - - - - 0 - 0 - - - - 23 - - - - + Measurement Units - - - - - 0 - 0 - - - - 5 - - - @@ -912,14 +721,14 @@ p, li { white-space: pre-wrap; } - + Timeshift from UTC - + QLayout::SetMinimumSize @@ -1447,7 +1256,7 @@ p, li { white-space: pre-wrap; } - + Hz @@ -1466,69 +1275,7 @@ p, li { white-space: pre-wrap; } - - - - "No Sound" Warning - - - - - - - Low Memory 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 - - - - Show Splash Screen on Startup - - - - + @@ -1538,108 +1285,7 @@ p, li { white-space: pre-wrap; } - - - - - - - Contrast - - - - - - - - 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 - - - - - - - Inactivity Timer - - - - - - - - Standard - - - - - Optrex - - - - - - - - LCD Display Type - - - - - - - - 0 - 0 - - - - - - - - - - - - - 10 - - - 45 - - - 25 - - - - + @@ -1682,14 +1328,251 @@ Acceptable values are 5v..10v - - + + - BackLight Switch + Vario pitch at max - + + + + + 0 + 0 + + + + + + + + + + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. + + + sec + + + 600 + + + 5 + + + + + + + Hz + + + 1300 + + + 2900 + + + 10 + + + 1700 + + + + + + + ms + + + 200 + + + 1000 + + + 10 + + + 500 + + + + + + + Backlight Brightness + + + + + + + Vario repeat at zero + + + + + + + Backlight Auto OFF after + + + + + + + 100 + + + + + + + + + + RotEnc Navigation + + + + + + + Backlight color + + + + + + + + Standard + + + + + Optrex + + + + + + + + + + + Contrast + + + + + + + + 0 + 0 + + + + + + + + + + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. + + + min + + + 120 + + + + + + + + 4800 Baud + + + + + 9600 Baud + + + + + 14400 Baud + + + + + 19200 Baud + + + + + 38400 Baud + + + + + 57600 Baud + + + + + 76800 Baud + + + + + 115200 Baud + + + + + + + + Backlight Switch + + + + + + + + 0 + 0 + + + + 23 + + + + + + + + 0 + 0 + + + + Show Splash Screen on Startup + + + + @@ -1707,6 +1590,152 @@ Acceptable values are 5v..10v + + + + LCD Display Type + + + + + + + + 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 + + + + + + + MAVLink Baud Rate + + + + + + + + 0 + 0 + + + + + + + + + + + + + 10 + + + 45 + + + 25 + + + + + + + Speaker Volume + + + + + + + Haptic Length + + + + + + + Inactivity Timer + + + + + + + + 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 + + + + 5 + + + @@ -1786,116 +1815,122 @@ Acceptable values are 5v..10v - - + + - Vario pitch at max + "No Sound" Warning - - - - - 0 - 0 - - - - - - - - - - If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. - - - sec - - - 600 - - - 5 - - - - - - - Hz - - - 1300 - - - 2900 - - - 10 - - - 1700 - - - - - - - ms - - - 200 - - - 1000 - - - 10 - - - 500 - - - - - + + - BackLight Brightness + Low Memory Warning - - + + - Vario repeat at zero + Haptic Strength - - - - BackLight Auto OFF after - - - - - - - 100 - - - - - - - - - - RotEnc Navigation - - + + + + + + Beep volume + + + + + + + -2 + + + 2 + + + 1 + + + Qt::Horizontal + + + + + + + Wav volume + + + + + + + -2 + + + 2 + + + 1 + + + Qt::Horizontal + + + + + + + Vario volume + + + + + + + -2 + + + 2 + + + 1 + + + Qt::Horizontal + + + + + + + Background volume + + + + + + + -2 + + + 2 + + + 1 + + + Qt::Horizontal + + + +