mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 17:55:19 +03:00
Fixes #7370
This commit is contained in:
parent
1d3f04482f
commit
cb31b10b36
2 changed files with 20 additions and 11 deletions
|
@ -693,9 +693,11 @@ class FlightModeField: public TransformedField {
|
|||
internalField.Append(new UnsignedField<8>(this, phase.fadeIn));
|
||||
internalField.Append(new UnsignedField<8>(this, phase.fadeOut));
|
||||
|
||||
if (version < 219) {
|
||||
for (int i = 0; i < rotencCount; i++) {
|
||||
internalField.Append(new SignedField<16>(this, phase.rotaryEncoders[i]));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_GVARS(board, version); i++) {
|
||||
internalField.Append(new SignedField<16>(this, phase.gvars[i]));
|
||||
|
|
|
@ -99,9 +99,10 @@ void Joystick::processEvents()
|
|||
axes[i] = moved;
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
axisRepeatTimers[i].restart();
|
||||
}
|
||||
}
|
||||
else {
|
||||
emit axisValueChanged(i, 0);
|
||||
}
|
||||
|
@ -112,28 +113,34 @@ void Joystick::processEvents()
|
|||
emit buttonValueChanged(i, (bool) changed);
|
||||
buttons[i] = changed;
|
||||
buttonRepeatTimers[i].restart();
|
||||
} else if (autoRepeat && changed != 0) {
|
||||
}
|
||||
else if (autoRepeat && changed != 0) {
|
||||
if ( buttonRepeatTimers[i].elapsed() >= autoRepeatDelay ) {
|
||||
emit buttonValueChanged(i, (bool) changed);
|
||||
buttons[i] = changed;
|
||||
}
|
||||
} else
|
||||
}
|
||||
else {
|
||||
buttonRepeatTimers[i].restart();
|
||||
}
|
||||
}
|
||||
for (i = 0; i < numHats; i++) {
|
||||
Uint8 changed = SDL_JoystickGetHat(joystick, i);
|
||||
if ( (changed != hats[i]) ) {
|
||||
emit hatValueChanged(i, changed);
|
||||
hats[i] = changed;
|
||||
hatRepeatTimers[i].restart();
|
||||
} else if (autoRepeat && changed != 0) {
|
||||
}
|
||||
else if (autoRepeat && changed != 0) {
|
||||
if (hatRepeatTimers[i].elapsed() >= autoRepeatDelay) {
|
||||
emit hatValueChanged(i, changed);
|
||||
hats[i] = changed;
|
||||
}
|
||||
} else
|
||||
}
|
||||
else {
|
||||
hatRepeatTimers[i].restart();
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < numTrackballs; i++) {
|
||||
int dx, dy;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue