Renamed lswReset() to logicalSwitchesReset()

Added PACKED to logical switches data structures
This commit is contained in:
Damjan Adamic
2014-05-17 19:38:23 +02:00
parent 8ec706ad08
commit 1491d3b236
4 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -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++) {