feat: add ability to disable trainer warning on shutdown (#4831)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
3djc
2024-05-08 11:19:18 +10:00
committed by GitHub
co-authored by philmoz Peter Feerick
parent acd34e7fc9
commit 09d4066a23
41 changed files with 944 additions and 849 deletions
@@ -271,6 +271,7 @@ ui(new Ui::GeneralSetup)
ui->alarmwarnChkB->setChecked(!generalSettings.disableAlarmWarning); // Default is zero=checked
ui->rssiPowerOffWarnChkB->setChecked(!generalSettings.disableRssiPoweroffAlarm); // Default is zero=checked
ui->trainerPowerOffWarnChkB->setChecked(!generalSettings.disableTrainerPoweroffAlarm); // Default is zero=checked
ui->splashScreenDuration->setCurrentIndex(3-generalSettings.splashMode);
if (IS_FAMILY_HORUS_OR_T16(firmware->getBoard())) {
@@ -820,6 +821,12 @@ void GeneralSetupPanel::on_rssiPowerOffWarnChkB_stateChanged(int)
emit modified();
}
void GeneralSetupPanel::on_trainerPowerOffWarnChkB_stateChanged(int)
{
generalSettings.disableTrainerPoweroffAlarm = ui->trainerPowerOffWarnChkB->isChecked() ? 0 : 1;
emit modified();
}
void GeneralSetupPanel::on_beeperCB_currentIndexChanged(int index)
{
generalSettings.beeperMode = (GeneralSettings::BeeperMode)(index-2);