Compare commits

...
2 Commits
Author SHA1 Message Date
r4 ea93980795 fix message 2022-11-27 02:07:03 +01:00
r4 dac3a33e9e fix typo 2022-11-27 02:06:43 +01:00
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ static void command_loop() {
}
void cmd() {
printf(F("You are now in command mode. Reset to exit. Type 'help' for a list of commands.\n"));
printf(F("You are now in command mode. Type 'help' for a list of commands.\n"));
while (Serial.available()) Serial.read();
while (1) {
command_loop();
+4 -4
View File
@@ -5,9 +5,9 @@
void (*full_reset)() = nullptr;
static volatile bool wdt_int_sleep_mode = false;
static volatile bool wdt_in_sleep_mode = false;
ISR (WDT_vect) {
if (wdt_int_sleep_mode)
if (wdt_in_sleep_mode)
wdt_disable();
else
full_reset();
@@ -15,7 +15,7 @@ ISR (WDT_vect) {
/* Based on https://github.com/rocketscream/Low-Power. */
void low_power_sleep_minutes(unsigned long t) {
wdt_int_sleep_mode = true;
wdt_in_sleep_mode = true;
ADCSRA &= ~_BV(ADEN); /* Disable ADC. */
for (unsigned long i = 0; 8ul * i < 60ul * t; i++) {
// Power Down for 8s
@@ -33,5 +33,5 @@ void low_power_sleep_minutes(unsigned long t) {
} while (0);
}
ADCSRA |= _BV(ADEN); /* Re-enable ADC. */
wdt_int_sleep_mode = false;
wdt_in_sleep_mode = false;
}