kopia lustrzana https://github.com/bristol-seds/pico-tracker
[watchdog] Fix stupid in IDLE_WAIT_FOR_GPS from 73281c2
rodzic
6a38dddada
commit
de761fe90f
|
@ -45,7 +45,7 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
#define MAXIDLE_WHILE_TELEMETRY_ACTIVE 60000
|
#define MAXIDLE_WHILE_TELEMETRY_ACTIVE 60000
|
||||||
#define MAXIDLE_WAIT_FOR_NEXT_TELEMETRY 30000
|
#define MAXIDLE_WAIT_FOR_NEXT_TELEMETRY 30000
|
||||||
#define MAXIDLE_WAIT_FOR_GPS 1000
|
#define MAXIDLE_WAIT_FOR_GPS 30000
|
||||||
|
|
||||||
struct idle_counter {
|
struct idle_counter {
|
||||||
uint32_t while_telemetry_active;
|
uint32_t while_telemetry_active;
|
||||||
|
|
|
@ -59,6 +59,7 @@ void increment_idle_counter(idle_wait_t idle_t)
|
||||||
break;
|
break;
|
||||||
case IDLE_WAIT_FOR_GPS:
|
case IDLE_WAIT_FOR_GPS:
|
||||||
idle_count.wait_for_gps++;
|
idle_count.wait_for_gps++;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* Oh no no no. Let's die here */
|
/* Oh no no no. Let's die here */
|
||||||
while(1);
|
while(1);
|
||||||
|
@ -71,7 +72,7 @@ void check_idle_counters(void)
|
||||||
{
|
{
|
||||||
if ((idle_count.while_telemetry_active > MAXIDLE_WHILE_TELEMETRY_ACTIVE) ||
|
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_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 */
|
/* Oh dear. Let's die here */
|
||||||
while (1);
|
while (1);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue