Commit 4423a07e authored by Don Gagne's avatar Don Gagne

Joystick can't be enabled if no joysticks connected

parent d021a520
......@@ -20,8 +20,6 @@
Q_DECLARE_LOGGING_CATEGORY(JoystickManagerLog)
class QGCApplicaiton;
class JoystickManager : public QGCTool
{
Q_OBJECT
......
......@@ -1057,7 +1057,10 @@ void Vehicle::_loadSettings(void)
_joystickMode = JoystickModeRC;
}
_joystickEnabled = settings.value(_joystickEnabledSettingsKey, false).toBool();
// Joystick enabled is a global setting so first make sure there are any joysticks connected
if (qgcApp()->toolbox()->joystickManager()->joysticks().count()) {
_joystickEnabled = settings.value(_joystickEnabledSettingsKey, false).toBool();
}
}
void Vehicle::_saveSettings(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment