feat: option to disable power on/off haptic (#5017)

This commit is contained in:
Peter Feerick
2024-06-09 11:13:26 +10:00
committed by GitHub
parent 2c800c0f3c
commit 42153fbb84
41 changed files with 1182 additions and 1046 deletions
@@ -289,6 +289,8 @@ ui(new Ui::GeneralSetup)
ui->pwrOnDelay->hide();
}
ui->pwrOnOffHaptic_CB->setChecked(!generalSettings.disablePwrOnOffHaptic); // Default is zero=checked
ui->registrationId->setValidator(new NameValidator(board, this));
ui->registrationId->setMaxLength(REGISTRATION_ID_LEN);
@@ -642,6 +644,12 @@ void GeneralSetupPanel::on_pwrOffDelay_valueChanged(int)
emit modified();
}
void GeneralSetupPanel::on_pwrOnOffHaptic_CB_stateChanged(int)
{
generalSettings.disablePwrOnOffHaptic = ui->pwrOnOffHaptic_CB->isChecked() ? 0 : 1;
emit modified();
}
void GeneralSetupPanel::on_beepVolume_SL_valueChanged()
{
generalSettings.beepVolume=ui->beepVolume_SL->value();