Skip to content

Commit

Permalink
Update WeatherSensor.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Aug 1, 2023
1 parent 7afc5fe commit ce34f99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/WeatherSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ce34f99

Please sign in to comment.