|
|
@ -42,7 +42,6 @@ Joystick::Joystick(const QString& name, int axisCount, int buttonCount, int hatC |
|
|
|
, _rgAxisValues(NULL) |
|
|
|
, _rgAxisValues(NULL) |
|
|
|
, _rgCalibration(NULL) |
|
|
|
, _rgCalibration(NULL) |
|
|
|
, _rgButtonValues(NULL) |
|
|
|
, _rgButtonValues(NULL) |
|
|
|
, _rgButtonActions(NULL) |
|
|
|
|
|
|
|
, _lastButtonBits(0) |
|
|
|
, _lastButtonBits(0) |
|
|
|
, _throttleMode(ThrottleModeCenterZero) |
|
|
|
, _throttleMode(ThrottleModeCenterZero) |
|
|
|
, _activeVehicle(NULL) |
|
|
|
, _activeVehicle(NULL) |
|
|
@ -53,7 +52,6 @@ Joystick::Joystick(const QString& name, int axisCount, int buttonCount, int hatC |
|
|
|
_rgAxisValues = new int[_axisCount]; |
|
|
|
_rgAxisValues = new int[_axisCount]; |
|
|
|
_rgCalibration = new Calibration_t[_axisCount]; |
|
|
|
_rgCalibration = new Calibration_t[_axisCount]; |
|
|
|
_rgButtonValues = new bool[_totalButtonCount]; |
|
|
|
_rgButtonValues = new bool[_totalButtonCount]; |
|
|
|
_rgButtonActions = new QString[_totalButtonCount]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i=0; i<_axisCount; i++) { |
|
|
|
for (int i=0; i<_axisCount; i++) { |
|
|
|
_rgAxisValues[i] = 0; |
|
|
|
_rgAxisValues[i] = 0; |
|
|
@ -70,7 +68,6 @@ Joystick::~Joystick() |
|
|
|
delete _rgAxisValues; |
|
|
|
delete _rgAxisValues; |
|
|
|
delete _rgCalibration; |
|
|
|
delete _rgCalibration; |
|
|
|
delete _rgButtonValues; |
|
|
|
delete _rgButtonValues; |
|
|
|
delete _rgButtonActions; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Joystick::_loadSettings(void) |
|
|
|
void Joystick::_loadSettings(void) |
|
|
@ -126,7 +123,7 @@ void Joystick::_loadSettings(void) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (int button=0; button<_buttonCount; button++) { |
|
|
|
for (int button=0; button<_buttonCount; button++) { |
|
|
|
_rgButtonActions[button] = settings.value(QString(_buttonActionSettingsKey).arg(button), QString()).toString();
|
|
|
|
_rgButtonActions << settings.value(QString(_buttonActionSettingsKey).arg(button), QString()).toString(); |
|
|
|
qCDebug(JoystickLog) << "_loadSettings button:action" << button << _rgButtonActions[button]; |
|
|
|
qCDebug(JoystickLog) << "_loadSettings button:action" << button << _rgButtonActions[button]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|