mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 01:05:10 +03:00
Renamed lswReset() to logicalSwitchesReset()
Added PACKED to logical switches data structures
This commit is contained in:
parent
8ec706ad08
commit
1491d3b236
4 changed files with 8 additions and 8 deletions
|
@ -53,7 +53,7 @@ void doMixerCalculations();
|
|||
memset(act, 0, sizeof(act)); \
|
||||
memset(swOn, 0, sizeof(swOn)); \
|
||||
int32_t lastAct = 0; lastAct = lastAct; /* to avoid a warning */ \
|
||||
lswReset();
|
||||
logicalSwitchesReset();
|
||||
|
||||
uint16_t anaInValues[NUM_STICKS+NUM_POTS] = { 0 };
|
||||
uint16_t anaIn(uint8_t chan)
|
||||
|
|
|
@ -1519,7 +1519,7 @@ void flightReset()
|
|||
#if defined(FRSKY)
|
||||
telemetryReset();
|
||||
#endif
|
||||
lswReset();
|
||||
logicalSwitchesReset();
|
||||
|
||||
s_mixer_first_run_done = false;
|
||||
|
||||
|
|
|
@ -694,7 +694,7 @@ NOINLINE void per10ms();
|
|||
getvalue_t getValue(uint8_t i);
|
||||
bool getSwitch(int8_t swtch);
|
||||
void lswTimerTick();
|
||||
void lswReset();
|
||||
void logicalSwitchesReset();
|
||||
void evalLogicalSwitches(uint8_t mode);
|
||||
void copyLswState(uint8_t oldPhase, uint8_t newPhase);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#define CS_LAST_VALUE_INIT -32768
|
||||
|
||||
typedef struct {
|
||||
PACK(typedef struct {
|
||||
uint8_t state:1;
|
||||
#if defined(CPUARM)
|
||||
uint8_t internalState:1;
|
||||
|
@ -46,11 +46,11 @@ typedef struct {
|
|||
uint32_t duration;
|
||||
#endif
|
||||
int16_t lastValue;
|
||||
} lsw_struct;
|
||||
}) lsw_struct;
|
||||
|
||||
typedef struct {
|
||||
PACK(typedef struct {
|
||||
lsw_struct ls[NUM_LOGICAL_SWITCH];
|
||||
} lsw_array;
|
||||
}) lsw_array;
|
||||
|
||||
lsw_array lswFm[MAX_FLIGHT_MODES];
|
||||
|
||||
|
@ -702,7 +702,7 @@ int16_t lswTimerValue(delayval_t val)
|
|||
return (val < -109 ? 129+val : (val < 7 ? (113+val)*5 : (53+val)*10));
|
||||
}
|
||||
|
||||
void lswReset() {
|
||||
void logicalSwitchesReset() {
|
||||
for (uint8_t fm=0; fm<MAX_FLIGHT_MODES; fm++) {
|
||||
lsw_array * lsa = &lswFm[fm];
|
||||
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue