From c99f9ba04474e90f69c4b7e74b3e13bf61a46a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20R=C3=B6mer?= Date: Wed, 7 May 2025 19:11:27 +0200 Subject: [PATCH] Set watchdog timeout to 1 second - simplicity - shorter software timeout --- avrrfm.c | 10 +++++----- librfm95.a | Bin 165236 -> 165236 bytes 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/avrrfm.c b/avrrfm.c index 9932a48..dedfd76 100644 --- a/avrrfm.c +++ b/avrrfm.c @@ -35,8 +35,8 @@ #include "dejavu.h" #include "unifont.h" -#define TRANSMIT_FAST 30 // 30 ~ 60 seconds -#define TRANSMIT_SLOW 150 // 150 ~ 5 minutes +#define TRANSMIT_FAST 60 // seconds +#define TRANSMIT_SLOW 300 // seconds #define MAX_TIMEOUTS 9 // slow down tx attempts after so many timeouts #define LABEL_OFFSET 10 @@ -76,7 +76,7 @@ #endif static volatile uint8_t watchdogInts = 0; -static uint8_t measureInts = TRANSMIT_FAST; +static uint16_t measureInts = TRANSMIT_FAST; static uint8_t timeoutCount = 0; /* Temp. label coordinates */ @@ -194,8 +194,8 @@ static void initWatchdog(void) { wdt_reset(); // watchdog change enable WDTCSR |= (1 << WDCE) | (1 << WDE); - // enable interrupt, disable system reset, bark every 2 seconds - WDTCSR = (1 << WDIE) | (0 << WDE) | (1 << WDP2) | (1 << WDP1) | (1 << WDP0); + // enable interrupt, disable system reset, bark every second + WDTCSR = (1 << WDIE) | (0 << WDE) | (1 << WDP2) | (1 << WDP1); } /** diff --git a/librfm95.a b/librfm95.a index 3821c482d3d492e0d82d88db877b436a7509e167..66f61ae76b4ceab91c631a0975d138581c4d864f 100644 GIT binary patch delta 63 zcmey;#r36&Yk~}$nTd&orR7GYGDawK^E^f|W~To4o42u8n@wJBAir6_+D?n{f3tsT OyMHRxo42u8n=wwAY-lRCS-{#(i*ZV` Qe`>pbD&uzlR3=pg0H}Nv2><{9