void SetJoystick::setAxisThrottle(int axisNum, JoyAxis::ThrottleTypes throttle) { if (axes.contains(axisNum)) { JoyAxis *temp = axes.value(axisNum); temp->setInitialThrottle(throttle); } }
void SetJoystick::refreshAxes() { deleteAxes(); InputDevice *device = getInputDevice(); for (int i=0; i < device->getNumberRawAxes(); i++) { JoyAxis *axis = new JoyAxis(i, index, this, this); axes.insert(i, axis); if (device->hasCalibrationThrottle(i)) { JoyAxis::ThrottleTypes throttle = device->getCalibrationThrottle(i); axis->setInitialThrottle(throttle); } enableAxisConnections(axis); } }