|
|
|
@ -19,7 +19,7 @@ QGC_LOGGING_CATEGORY(JoystickLog, "JoystickLog")
@@ -19,7 +19,7 @@ QGC_LOGGING_CATEGORY(JoystickLog, "JoystickLog")
|
|
|
|
|
QGC_LOGGING_CATEGORY(JoystickValuesLog, "JoystickValuesLog") |
|
|
|
|
|
|
|
|
|
const char* Joystick::_settingsGroup = "Joysticks"; |
|
|
|
|
const char* Joystick::_calibratedSettingsKey = "Calibrated"; |
|
|
|
|
const char* Joystick::_calibratedSettingsKey = "Calibrated1"; // Increment number to force recalibration
|
|
|
|
|
const char* Joystick::_buttonActionSettingsKey = "ButtonActionName%1"; |
|
|
|
|
const char* Joystick::_throttleModeSettingsKey = "ThrottleMode"; |
|
|
|
|
const char* Joystick::_exponentialSettingsKey = "Exponential"; |
|
|
|
@ -369,6 +369,11 @@ void Joystick::startPolling(Vehicle* vehicle)
@@ -369,6 +369,11 @@ void Joystick::startPolling(Vehicle* vehicle)
|
|
|
|
|
// Always set up the new vehicle
|
|
|
|
|
_activeVehicle = vehicle; |
|
|
|
|
|
|
|
|
|
// If joystick is not calibrated, disable it
|
|
|
|
|
if ( !_calibrated ) { |
|
|
|
|
vehicle->setJoystickEnabled(false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Only connect the new vehicle if it wants joystick data
|
|
|
|
|
if (vehicle->joystickEnabled()) { |
|
|
|
|
_pollingStartedForCalibration = false; |
|
|
|
|