diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 67fd19078..0d1c5c578 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -748,9 +748,9 @@ getvalue_t getValue(mixsrc_t i); #if defined(CPUARM) #define GETSWITCH_MIDPOS_DELAY 1 -bool getSwitch(int8_t swtch, uint8_t flags=0); +bool getSwitch(swsrc_t swtch, uint8_t flags=0); #else -bool getSwitch(int8_t swtch); +bool getSwitch(swsrc_t swtch); #endif void logicalSwitchesTimerTick(); diff --git a/radio/src/switches.cpp b/radio/src/switches.cpp index 8ad5694d9..447eef724 100644 --- a/radio/src/switches.cpp +++ b/radio/src/switches.cpp @@ -235,7 +235,7 @@ bool getLogicalSwitch(uint8_t idx) bool result; #if defined(CPUARM) - int8_t s = ls->andsw; + swsrc_t s = ls->andsw; #else uint8_t s = ls->andsw; if (s > SWSRC_LAST_SWITCH) { @@ -443,9 +443,9 @@ DurationAndDelayProcessing: } #if defined(CPUARM) -bool getSwitch(int8_t swtch, uint8_t flags) +bool getSwitch(swsrc_t swtch, uint8_t flags) #else -bool getSwitch(int8_t swtch) +bool getSwitch(swsrc_t swtch) #endif { bool result; @@ -547,7 +547,7 @@ bool getSwitch(int8_t swtch) void evalLogicalSwitches(bool isCurrentPhase) { for (unsigned int idx=0; idx