@@ -250,6 +250,11 @@ ui(new Ui::GeneralSetup)
250250
251251 ui->rssiPowerOffWarnChkB ->setChecked (!generalSettings.disableRssiPoweroffAlarm ); // Default is zero=checked
252252
253+ ui->customWarningEnable ->setChecked (generalSettings.customWarningEnable );
254+ ui->customWarningTitle ->setText (generalSettings.customWarningTitle );
255+ ui->customWarningText ->setText (generalSettings.customWarningText );
256+
257+
253258 if (IS_FAMILY_HORUS_OR_T16 (firmware->getBoard ())) {
254259 ui->splashScreenDuration ->hide ();
255260 ui->splashScreenLabel ->hide ();
@@ -730,6 +735,30 @@ void GeneralSetupPanel::on_rssiPowerOffWarnChkB_stateChanged(int)
730735 emit modified ();
731736}
732737
738+ void GeneralSetupPanel::on_customWarningEnable_stateChanged (int )
739+ {
740+ generalSettings.customWarningEnable = ui->customWarningEnable ->isChecked () ? 1 : 0 ;
741+ emit modified ();
742+ }
743+
744+ void GeneralSetupPanel::on_customWarningTitle_editingFinished ()
745+ {
746+ // copy ownerID back to generalSettings.registrationId
747+ QByteArray array = ui->customWarningTitle ->text ().toLocal8Bit ();
748+ strncpy (generalSettings.customWarningTitle , array, 8 );
749+ generalSettings.customWarningTitle [8 ] = ' \0 ' ;
750+ emit modified ();
751+ }
752+
753+ void GeneralSetupPanel::on_customWarningText_editingFinished ()
754+ {
755+ // copy ownerID back to generalSettings.registrationId
756+ QByteArray array = ui->customWarningText ->text ().toLocal8Bit ();
757+ strncpy (generalSettings.customWarningText , array, 32 );
758+ generalSettings.customWarningText [32 ] = ' \0 ' ;
759+ emit modified ();
760+ }
761+
733762void GeneralSetupPanel::on_beeperCB_currentIndexChanged (int index)
734763{
735764 generalSettings.beeperMode = (GeneralSettings::BeeperMode)(index-2 );
0 commit comments