Arduino refactoring #4

Open
fiveop wants to merge 28 commits from fiveop/arduino_refactoring into master
Showing only changes of commit 19a1c177c6 - Show all commits

View file

@ -39,11 +39,7 @@ void update_space_status() {
} }
} }
void loop(){ void update_space_status_b4() {
print_status();
update_space_status();
// status check if we can switch the status. // status check if we can switch the status.
// low pass prevents waggling a bit // low pass prevents waggling a bit
if (space_status >= THRESHOLD-3) { if (space_status >= THRESHOLD-3) {
@ -53,6 +49,14 @@ void loop(){
// open // open
space_status_b4 = 0; space_status_b4 = 0;
} }
}
void loop(){
print_status();
update_space_status();
update_space_status_b4();
delay(DELAY_TIME); delay(DELAY_TIME);