diff --git a/firmware/inc/watchdog.h b/firmware/inc/watchdog.h index ce7cc3b..370bec9 100644 --- a/firmware/inc/watchdog.h +++ b/firmware/inc/watchdog.h @@ -45,7 +45,7 @@ typedef enum { */ #define MAXIDLE_WHILE_TELEMETRY_ACTIVE 60000 #define MAXIDLE_WAIT_FOR_NEXT_TELEMETRY 30000 -#define MAXIDLE_WAIT_FOR_GPS 1000 +#define MAXIDLE_WAIT_FOR_GPS 30000 struct idle_counter { uint32_t while_telemetry_active; diff --git a/firmware/src/watchdog.c b/firmware/src/watchdog.c index 88bb82b..b17ff41 100644 --- a/firmware/src/watchdog.c +++ b/firmware/src/watchdog.c @@ -59,6 +59,7 @@ void increment_idle_counter(idle_wait_t idle_t) break; case IDLE_WAIT_FOR_GPS: idle_count.wait_for_gps++; + break; default: /* Oh no no no. Let's die here */ while(1); @@ -71,7 +72,7 @@ void check_idle_counters(void) { if ((idle_count.while_telemetry_active > MAXIDLE_WHILE_TELEMETRY_ACTIVE) || (idle_count.wait_for_next_telemetry > MAXIDLE_WAIT_FOR_NEXT_TELEMETRY) || - (idle_count.wait_for_next_telemetry > MAXIDLE_WAIT_FOR_GPS)) { + (idle_count.wait_for_gps > MAXIDLE_WAIT_FOR_GPS)) { /* Oh dear. Let's die here */ while (1); }