Compare commits
1 Commits
9df9475ea1
...
4395bf0704
Author | SHA1 | Date | |
---|---|---|---|
4395bf0704 |
16
src/main.c
16
src/main.c
@ -129,18 +129,10 @@ void handle_state_shutdown()
|
||||
void handle_state_guard()
|
||||
{
|
||||
if(guard_expire) {
|
||||
if(ignition_on()) {
|
||||
switch_power(on);
|
||||
PORTB &= ~(1 << MOSI_PIN);
|
||||
PORTB &= ~(1 << MISO_PIN);
|
||||
PORTB &= ~(1 << SCK_PIN);
|
||||
current_state = state_on;
|
||||
} else {
|
||||
current_state = state_off;
|
||||
sleep_enable();
|
||||
sleep_cpu();
|
||||
sleep_disable();
|
||||
}
|
||||
current_state = state_off;
|
||||
sleep_enable();
|
||||
sleep_cpu();
|
||||
sleep_disable();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user