From ce34f99a58ad262547c8bc0d81bb55704ec429d2 Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Tue, 1 Aug 2023 22:32:39 +0200 Subject: [PATCH] Update WeatherSensor.cpp --- src/WeatherSensor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WeatherSensor.cpp b/src/WeatherSensor.cpp index b3b3f39a..af0ec649 100644 --- a/src/WeatherSensor.cpp +++ b/src/WeatherSensor.cpp @@ -538,6 +538,7 @@ DecodeStatus WeatherSensor::decodeBresser5In1Payload(uint8_t *msg, uint8_t msgSi sensor[slot].sensor_id = id_tmp; sensor[slot].s_type = type_tmp; + sensor[slot].chan = 0; // for compatibility with other decoders sensor[slot].startup = ((msg[15] & 0x80) == 0) ? true : false; int temp_raw = (msg[20] & 0x0f) + ((msg[20] & 0xf0) >> 4) * 10 + (msg[21] &0x0f) * 100; @@ -569,7 +570,7 @@ DecodeStatus WeatherSensor::decodeBresser5In1Payload(uint8_t *msg, uint8_t msgSi sensor[slot].battery_ok = (msg[25] & 0x80) ? false : true; - /* check if the message is from a Bresser Professional Rain Gauge */ + // check if the message is from a Bresser Professional Rain Gauge if ((msg[15] & 0xF) == 0x9) { // rescale the rain sensor readings sensor[slot].rain_mm *= 2.5;