Commit 2f7b754a authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5774 from DonLakeFlyer/StableMerge

Stable merge to master
parents 5793c550 9833c9af
...@@ -170,7 +170,7 @@ SetupPage { ...@@ -170,7 +170,7 @@ SetupPage {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
spacing: Math.round(ScreenTools.defaultFontPixelHeight / 2) spacing: Math.round(ScreenTools.defaultFontPixelHeight / 2)
visible: sensorParams.rgCompassAvailable[index] visible: sensorParams.rgCompassAvailable[index] && sensorParams.rgCompassUseFact[index].value
property real greenMaxThreshold: 8 * (sensorParams.rgCompassExternal[index] ? 1 : 2) property real greenMaxThreshold: 8 * (sensorParams.rgCompassExternal[index] ? 1 : 2)
property real yellowMaxThreshold: 15 * (sensorParams.rgCompassExternal[index] ? 1 : 2) property real yellowMaxThreshold: 15 * (sensorParams.rgCompassExternal[index] ? 1 : 2)
......
...@@ -226,7 +226,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone ...@@ -226,7 +226,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone
_startLogCalibration(); _startLogCalibration();
uint8_t compassBits = 0; uint8_t compassBits = 0;
if (getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_DEV_ID"))->rawValue().toInt() > 0) { if (getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_DEV_ID"))->rawValue().toInt() > 0 &&
getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_USE"))->rawValue().toBool()) {
compassBits |= 1 << 0; compassBits |= 1 << 0;
qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 1"; qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 1";
} else { } else {
...@@ -234,7 +235,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone ...@@ -234,7 +235,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone
_rgCompassCalSucceeded[0] = true; _rgCompassCalSucceeded[0] = true;
_rgCompassCalFitness[0] = 0; _rgCompassCalFitness[0] = 0;
} }
if (getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_DEV_ID2"))->rawValue().toInt() > 0) { if (getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_DEV_ID2"))->rawValue().toInt() > 0 &&
getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_USE2"))->rawValue().toBool()) {
compassBits |= 1 << 1; compassBits |= 1 << 1;
qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 2"; qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 2";
} else { } else {
...@@ -242,7 +244,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone ...@@ -242,7 +244,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone
_rgCompassCalSucceeded[1] = true; _rgCompassCalSucceeded[1] = true;
_rgCompassCalFitness[1] = 0; _rgCompassCalFitness[1] = 0;
} }
if (getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_DEV_ID3"))->rawValue().toInt() > 0) { if (getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_DEV_ID3"))->rawValue().toInt() > 0 &&
getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_USE3"))->rawValue().toBool()) {
compassBits |= 1 << 2; compassBits |= 1 << 2;
qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 3"; qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 3";
} else { } else {
......
...@@ -73,7 +73,7 @@ void JoystickManager::_setActiveJoystickFromSettings(void) ...@@ -73,7 +73,7 @@ void JoystickManager::_setActiveJoystickFromSettings(void)
// Get the latest joystick mapping // Get the latest joystick mapping
newMap = JoystickSDL::discover(_multiVehicleManager); newMap = JoystickSDL::discover(_multiVehicleManager);
#elif defined(__android__) #elif defined(__android__)
_name2JoystickMap = JoystickAndroid::discover(_multiVehicleManager); newMap = JoystickAndroid::discover(_multiVehicleManager);
#endif #endif
if (_activeJoystick && !newMap.contains(_activeJoystick->name())) { if (_activeJoystick && !newMap.contains(_activeJoystick->name())) {
......
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