Skip to content

Commit

Permalink
Update BresserWeatherSensorBasic.ino
Browse files Browse the repository at this point in the history
Added typecast for RP2040
  • Loading branch information
matthias-bs committed Sep 27, 2023
1 parent a3829e6 commit d773815
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,20 @@ void loop()
}
Serial.printf("unknown1: [0x%03X] ", weatherSensor.sensor[i].lightning_unknown1);
Serial.printf("unknown2: [0x%04X] ", weatherSensor.sensor[i].lightning_unknown2);

} else if (weatherSensor.sensor[i].s_type == SENSOR_TYPE_LEAKAGE) {
Serial.printf("Id: [%8X] Typ: [%X] Battery: [%s] Ch: [%d] ",
weatherSensor.sensor[i].sensor_id,
(unsigned int)weatherSensor.sensor[i].sensor_id,
weatherSensor.sensor[i].s_type,
weatherSensor.sensor[i].battery_ok ? "OK " : "Low",
weatherSensor.sensor[i].chan
);
Serial.printf("Leakage: [%-5s] ", (weatherSensor.sensor[i].water_leakage_alarm) ? "ALARM" : "OK");

} else {
// Anything other (weather-like) sensor is very similar
// Any other (weather-like) sensor is very similar
Serial.printf("Id: [%8X] Typ: [%X] Battery: [%s] ",
weatherSensor.sensor[i].sensor_id,
(unsigned int)weatherSensor.sensor[i].sensor_id,
weatherSensor.sensor[i].s_type,
weatherSensor.sensor[i].battery_ok ? "OK " : "Low");
#ifdef BRESSER_6_IN_1
Expand Down

0 comments on commit d773815

Please sign in to comment.