Browse Source

Merge pull request #3854 from bluerobotics/joystickEnableStateFix

Fix persistency of joystickEnable setting
QGC4.4
Don Gagne 9 years ago committed by GitHub
parent
commit
89c87d8ca5
  1. 7
      src/Vehicle/Vehicle.cc

7
src/Vehicle/Vehicle.cc

@ -1119,7 +1119,12 @@ void Vehicle::_saveSettings(void)
settings.beginGroup(QString(_settingsGroup).arg(_id)); settings.beginGroup(QString(_settingsGroup).arg(_id));
settings.setValue(_joystickModeSettingsKey, _joystickMode); 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) int Vehicle::joystickMode(void)

Loading…
Cancel
Save