This commit is contained in:
Bertrand Songis
2019-11-08 19:29:08 +01:00
8 changed files with 12 additions and 9 deletions
+1
View File
@@ -214,6 +214,7 @@ void menuModelTelemetry(event_t event)
pushMenu(menuModelSensor);
}
else {
allowNewSensors = 0;
POPUP_WARNING(STR_TELEMETRYFULL);
}
}
+1
View File
@@ -205,6 +205,7 @@ void menuModelTelemetry(event_t event)
pushMenu(menuModelSensor);
}
else {
allowNewSensors = 0;
POPUP_WARNING(STR_TELEMETRYFULL);
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ union ZoneOptionValue
{
uint32_t unsignedValue;
int32_t signedValue;
bool boolValue;
uint32_t boolValue;
char stringValue[LEN_ZONE_OPTION_STRING];
};
+5 -5
View File
@@ -366,20 +366,20 @@ void OpenTxSim::updateKeysAndSwitches(bool start)
#define SWITCH_KEY(key, swtch, states) \
static bool state##key = 0; \
static int8_t state_##swtch = 2; \
static int8_t inc_##swtch = 1; \
static int8_t state_##swtch = -1; \
static int8_t inc_##swtch = 4-states; \
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-1)*inc_##swtch)) inc_##swtch = -4+states; \
else if (state_##swtch == -1) inc_##swtch = 4-states; \
state##key = true; \
} \
} \
else { \
state##key = false; \
} \
simuSetSwitch(swtch, state_##swtch-states)
simuSetSwitch(swtch, state_##swtch) \
#if defined(PCBSKY9X)
SWITCH_KEY(1, 0, 3);