mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 16:55:20 +03:00
Fixes #1039:
* order of logical switches calculaton now predicable: always from L1 to L64 * each flight mode has its own logical switches context (RAM usage multiplied by number of flight modes) * resolved problem of non-reentrancy of getSwitch() function
This commit is contained in:
parent
6e5f064c31
commit
07a5333a08
6 changed files with 744 additions and 736 deletions
|
@ -695,6 +695,8 @@ getvalue_t getValue(uint8_t i);
|
|||
bool getSwitch(int8_t swtch);
|
||||
void lswTimerTick();
|
||||
void lswReset();
|
||||
void evalLogicalSwitches(uint8_t mode);
|
||||
void copyLswState(uint8_t oldPhase, uint8_t newPhase);
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
void getSwitchesPosition(bool startup);
|
||||
|
@ -817,15 +819,6 @@ extern int8_t safetyCh[NUM_CHNOUT];
|
|||
|
||||
extern uint8_t trimsCheckTimer;
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define GETSWITCH_RECURSIVE_TYPE uint32_t
|
||||
#else
|
||||
#define GETSWITCH_RECURSIVE_TYPE uint16_t
|
||||
#endif
|
||||
|
||||
extern volatile GETSWITCH_RECURSIVE_TYPE s_last_switch_used;
|
||||
extern volatile GETSWITCH_RECURSIVE_TYPE s_last_switch_value;
|
||||
|
||||
#define TMR_OFF 0
|
||||
#define TMR_RUNNING 1
|
||||
#define TMR_NEGATIVE 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue