From 74c1daf51d788d5c59c4237349e9f0e7c4f250a6 Mon Sep 17 00:00:00 2001 From: Ralf Behrens Date: Thu, 13 Jan 2022 14:56:33 +0100 Subject: [PATCH] sleep TX_INTERVAL-10s --- src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 90b84e7..00ba9db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -66,7 +66,7 @@ static osjob_t sendjob; // Schedule TX every this many seconds (might become longer due to duty // cycle limitations). -const unsigned TX_INTERVAL = 60; +const unsigned TX_INTERVAL = 600; // Pin mapping // @@ -230,7 +230,9 @@ void onEvent(ev_t ev) { Serial1.println(F("vor sleep")); Serial1.flush(); - LowPower.sleep(50000); + + LowPower.sleep((uint32_t) (TX_INTERVAL-10)*1000); // bis kurz vor dem Ereignis schlafen + Serial1.println(F("wieder aufgewacht")); // => er wacht nicht wieder auf break;