1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-14 11:59:50 +03:00

simu switches for X9E fixed

This commit is contained in:
Damjan Adamic 2015-07-09 22:45:59 +02:00
parent 449829ea70
commit 1422deb42b

View file

@ -288,8 +288,9 @@ long Open9xSim::onTimeout(FXObject*, FXSelector, void*)
if (getApp()->getKeyState(KEY_##key)) { \
if (!state##key) { \
state_##swtch = (state_##swtch+inc_##swtch); \
if (state_##swtch == 1+states) inc_##swtch = -1; \
else if (state_##swtch == 2) inc_##swtch = 1; \
if (state_##swtch >= 1+states) inc_##swtch = -1; \
else if (state_##swtch <= 2) inc_##swtch = 1; \
/* TRACE("switch " #swtch ": state: %d, inc: %d", state_##swtch, inc_##swtch); */ \
state##key = true; \
} \
} \
@ -302,9 +303,9 @@ long Open9xSim::onTimeout(FXObject*, FXSelector, void*)
SWITCH_KEY(A, 0, 3);
SWITCH_KEY(B, 1, 3);
SWITCH_KEY(C, 2, 3);
SWITCH_KEY(D, 3, 2);
SWITCH_KEY(D, 3, 3);
SWITCH_KEY(E, 4, 3);
SWITCH_KEY(F, 5, 3);
SWITCH_KEY(F, 5, 2);
SWITCH_KEY(G, 6, 3);
SWITCH_KEY(H, 7, 2);
SWITCH_KEY(I, 8, 3);