|
52 | 52 | // 20240716 Added assignment of sensor[slot].decoder |
53 | 53 | // 20250127 Added SENSOR_TYPE_WEATHER8 (8-in-1 Weather Sensor) |
54 | 54 | // 20250129 Minor change in SENSOR_TYPE_WEATHER8 handling |
| 55 | +// 20260224 Removed obsolete variable f_3in1 and related code in decodeBresser6In1Payload() |
55 | 56 | // |
56 | 57 | // ToDo: |
57 | 58 | // - |
@@ -329,8 +330,8 @@ DecodeStatus WeatherSensor::decodeBresser5In1Payload(const uint8_t *msg, uint8_t |
329 | 330 | } |
330 | 331 | else |
331 | 332 | { |
332 | | - sensor[slot].w.humidity_ok = true; |
333 | | - sensor[slot].w.wind_ok = (msg[22] & 0x0f) <= 9; // BCD, 0x0f on error |
| 333 | + sensor[slot].w.wind_ok = true; |
| 334 | + sensor[slot].w.humidity_ok = (msg[22] & 0x0f) <= 9; // BCD, 0x0f on error |
334 | 335 | } |
335 | 336 |
|
336 | 337 | sensor[slot].s_type = type_tmp; |
@@ -441,7 +442,6 @@ DecodeStatus WeatherSensor::decodeBresser6In1Payload(const uint8_t *msg, uint8_t |
441 | 442 | bool uv_ok = false; |
442 | 443 | bool wind_ok = false; |
443 | 444 | bool rain_ok = false; |
444 | | - bool f_3in1 = false; |
445 | 445 |
|
446 | 446 | // LFSR-16 digest, generator 0x8810 init 0x5412 |
447 | 447 | int chkdgst = (msg[0] << 8) | msg[1]; |
@@ -508,7 +508,7 @@ DecodeStatus WeatherSensor::decodeBresser6In1Payload(const uint8_t *msg, uint8_t |
508 | 508 | sensor[slot].w.humidity = (msg[14] >> 4) * 10 + (msg[14] & 0x0f); |
509 | 509 |
|
510 | 510 | // apparently ff01 or 0000 if not available, ???0 if valid, inverted BCD |
511 | | - uv_ok = ((~msg[15] & 0xff) <= 0x99) && ((~msg[16] & 0xf0) <= 0x90) && !f_3in1; |
| 511 | + uv_ok = ((~msg[15] & 0xff) <= 0x99) && ((~msg[16] & 0xf0) <= 0x90); |
512 | 512 | if (uv_ok) |
513 | 513 | { |
514 | 514 | int uv_raw = ((~msg[15] & 0xf0) >> 4) * 100 + (~msg[15] & 0x0f) * 10 + ((~msg[16] & 0xf0) >> 4); |
@@ -588,7 +588,7 @@ DecodeStatus WeatherSensor::decodeBresser6In1Payload(const uint8_t *msg, uint8_t |
588 | 588 | // Weather station data is split into two separate messages (except for Professional Wind Gauge) |
589 | 589 | if (sensor[slot].s_type == SENSOR_TYPE_WEATHER1) |
590 | 590 | { |
591 | | - if (f_3in1 || (sensor[slot].w.temp_ok && sensor[slot].w.rain_ok)) |
| 591 | + if (sensor[slot].w.temp_ok && sensor[slot].w.rain_ok) |
592 | 592 | { |
593 | 593 | sensor[slot].complete = true; |
594 | 594 | } |
|
0 commit comments