From b6139964615b181d15a09a6a4ffe506883ed9ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Tue, 26 Dec 2017 19:09:28 +0100 Subject: [PATCH] Do not report sensor data if no magnitudes --- code/espurna/sensor.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/espurna/sensor.ino b/code/espurna/sensor.ino index 7a2edcf4..ce0a83ad 100644 --- a/code/espurna/sensor.ino +++ b/code/espurna/sensor.ino @@ -590,6 +590,8 @@ void sensorLoop() { static unsigned long last_update = 0; static unsigned long report_count = 0; + if (_magnitudes.size() == 0) return; + // Tick hook _sensorTick();