Cosmetics

This commit is contained in:
Damjan Adamic
2014-05-17 19:56:00 +02:00
parent 1491d3b236
commit d6a150738c
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -951,7 +951,7 @@ void evalMixes(uint8_t tick10ms)
fp_act[s_last_phase] = 0; fp_act[s_last_phase] = 0;
fp_act[phase] = MAX_ACT; fp_act[phase] = MAX_ACT;
} }
copyLswState(s_last_phase, phase); //push last logical switches state from old to new phase logicalSwitchesCopyState(s_last_phase, phase); //push last logical switches state from old to new phase
} }
s_last_phase = phase; s_last_phase = phase;
} }
+1 -1
View File
@@ -2219,7 +2219,7 @@ void doMixerCalculations()
s_cnt_100ms -= 10; s_cnt_100ms -= 10;
s_cnt_1s += 1; s_cnt_1s += 1;
lswTimerTick(); logicalSwitchesTimerTick();
if (s_cnt_1s >= 10) { // 1sec if (s_cnt_1s >= 10) { // 1sec
s_cnt_1s -= 10; s_cnt_1s -= 10;
+2 -2
View File
@@ -693,10 +693,10 @@ NOINLINE void per10ms();
getvalue_t getValue(uint8_t i); getvalue_t getValue(uint8_t i);
bool getSwitch(int8_t swtch); bool getSwitch(int8_t swtch);
void lswTimerTick(); void logicalSwitchesTimerTick();
void logicalSwitchesReset(); void logicalSwitchesReset();
void evalLogicalSwitches(uint8_t mode); void evalLogicalSwitches(uint8_t mode);
void copyLswState(uint8_t oldPhase, uint8_t newPhase); void logicalSwitchesCopyState(uint8_t oldPhase, uint8_t newPhase);
#if defined(PCBTARANIS) #if defined(PCBTARANIS)
void getSwitchesPosition(bool startup); void getSwitchesPosition(bool startup);
+2 -2
View File
@@ -603,7 +603,7 @@ void checkSwitches()
#endif #endif
} }
void lswTimerTick() { void logicalSwitchesTimerTick() {
for (uint8_t fm=0; fm<MAX_FLIGHT_MODES; fm++) { for (uint8_t fm=0; fm<MAX_FLIGHT_MODES; fm++) {
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++) { for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++) {
LogicalSwitchData * ls = lswAddress(i); LogicalSwitchData * ls = lswAddress(i);
@@ -727,7 +727,7 @@ getvalue_t convertLswTelemValue(LogicalSwitchData * ls)
return val; return val;
} }
void copyLswState(uint8_t oldPhase, uint8_t newPhase) { void logicalSwitchesCopyState(uint8_t oldPhase, uint8_t newPhase) {
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++) { for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++) {
lswFm[newPhase].ls[i].state = lswFm[oldPhase].ls[i].state; lswFm[newPhase].ls[i].state = lswFm[oldPhase].ls[i].state;
} }