diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index b507c317347e4ff5e7b067606703612e53c2cd10..e925e58953a370d663bb5d19abcc3b01d2842bdc 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -1119,7 +1119,12 @@ void Vehicle::_saveSettings(void) settings.beginGroup(QString(_settingsGroup).arg(_id)); settings.setValue(_joystickModeSettingsKey, _joystickMode); - settings.setValue(_joystickEnabledSettingsKey, _joystickEnabled); + + // The joystick enabled setting should only be changed if a joystick is present + // since the checkbox can only be clicked if one is present + if (qgcApp()->toolbox()->joystickManager()->joysticks().count()) { + settings.setValue(_joystickEnabledSettingsKey, _joystickEnabled); + } } int Vehicle::joystickMode(void)