matthias-bs / BresserWeatherSensorReceiver

Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver for Arduino based on CC1101, SX1276/RFM95W or SX1262
MIT License
113 stars 21 forks source link

6-in-1 Decoder: Bresser 3-in-1 Professional Wind Gauge / Anemometer, PN 7002531 - automatic decoding of negative temperatures #114

Closed matthias-bs closed 10 months ago

matthias-bs commented 10 months ago

This replaces the correction by specifying the sensor ID in WeatherSensorCfg.h.

temp = ((sign) ? (temp_raw - 1000) : temp_raw) * 0.1f;

// Correction for Bresser 3-in-1 Professional Wind Gauge / Anemometer, PN 7002531
if (temp < -50.0) {
    temp = ((sign) ? -temp_raw : temp_raw) * 0.1f;
}

The sensor range (as far as provided in the manuals) is -40...+60°C, so there is no risk that the intermediate values overlap.