Browse Source

Moved deadband indicators to the right column.

QGC4.4
nanthony21 8 years ago
parent
commit
d4dbe92070
  1. 27
      src/VehicleSetup/JoystickConfig.qml
  2. 2
      src/VehicleSetup/JoystickConfigController.cc
  3. 1
      src/VehicleSetup/JoystickConfigController.h

27
src/VehicleSetup/JoystickConfig.qml

@ -203,11 +203,6 @@ SetupPage { @@ -203,11 +203,6 @@ SetupPage {
}
Connections {
target: controller
onRollAxisDeadbandChanged: rollLoader.item.deadbandValue = value
}
Connections {
target: _activeJoystick
onManualControl: rollLoader.item.axisValue = roll*32768.0
@ -238,12 +233,6 @@ SetupPage { @@ -238,12 +233,6 @@ SetupPage {
}
Connections {
target: controller
onPitchAxisDeadbandChanged: pitchLoader.item.deadbandValue = value
}
Connections {
target: _activeJoystick
onManualControl: pitchLoader.item.axisValue = pitch*32768.0
@ -274,11 +263,6 @@ SetupPage { @@ -274,11 +263,6 @@ SetupPage {
}
Connections {
target: controller
onYawAxisDeadbandChanged: yawLoader.item.deadbandValue = value
}
Connections {
target: _activeJoystick
onManualControl: yawLoader.item.axisValue = yaw*32768.0
@ -309,11 +293,6 @@ SetupPage { @@ -309,11 +293,6 @@ SetupPage {
}
Connections {
target: controller
onThrottleAxisDeadbandChanged: throttleLoader.item.deadbandValue = value
}
Connections {
target: _activeJoystick
onManualControl: throttleLoader.item.axisValue = (-2*throttle+1)*32768.0
@ -758,6 +737,12 @@ SetupPage { @@ -758,6 +737,12 @@ SetupPage {
axisMonitorRepeater.itemAt(axis).loader.item.axisValue = value
}
}
onAxisDeadbandChanged: {
if (axisMonitorRepeater.itemAt(axis)) {
axisMonitorRepeater.itemAt(axis).loader.item.deadbandValue = value
}
}
}
Repeater {

2
src/VehicleSetup/JoystickConfigController.cc

@ -247,7 +247,7 @@ void JoystickConfigController::_axisDeadbandChanged(int axis, int value) @@ -247,7 +247,7 @@ void JoystickConfigController::_axisDeadbandChanged(int axis, int value)
value = abs(value)<_calValidMaxValue?abs(value):_calValidMaxValue;
_rgAxisInfo[axis].deadband = value;
emit axisDeadbandChanged(axis,value);
qCDebug(JoystickConfigControllerLog) << "Axis:" << axis << "Deadband:" << _rgAxisInfo[axis].deadband;
}

1
src/VehicleSetup/JoystickConfigController.h

@ -110,6 +110,7 @@ public: @@ -110,6 +110,7 @@ public:
signals:
void axisValueChanged(int axis, int value);
void axisDeadbandChanged(int axis, int value);
void rollAxisMappedChanged(bool mapped);
void pitchAxisMappedChanged(bool mapped);

Loading…
Cancel
Save