From dcc7e62179f723810d334ef0df8add2022a0d7df Mon Sep 17 00:00:00 2001 From: user2684 <you@example.com> Date: Wed, 12 Apr 2017 14:54:53 +0200 Subject: [PATCH] if node is IDLE, battery is reported continuously #66 --- NodeManager.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/NodeManager.cpp b/NodeManager.cpp index 3c6be30..5152d00 100644 --- a/NodeManager.cpp +++ b/NodeManager.cpp @@ -1647,10 +1647,8 @@ void NodeManager::loop() { // turn off the pin powering all the sensors if (_auto_power_pins) powerOff(); #endif - #if SLEEP_MANAGER == 1 - // continue/start sleeping as requested - _sleep(); - #endif + // continue/start sleeping as requested + if (_sleep_mode != WAIT) _sleep(); } #endif } -- GitLab