mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 16:55:20 +03:00
Backlight color support in companion
This commit is contained in:
parent
147b6af9cf
commit
57d541efc1
4 changed files with 884 additions and 831 deletions
|
@ -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},
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue