Added bugfix proposal to TODO.md

master
marcel 7 days ago
parent ca2c7ac80b
commit 3d980ab38a
  1. 14
      TODO.md

@ -1,10 +1,22 @@
# Todo list for weather station with ModBus over RS-485 # Todo list for weather station with ModBus over RS-485
## Bug in rain meter register
The first hour, the ModBus register SensorRainIreg is instable. This is because in setup(), the variable RainPerHourCounter is set to the current millis() value. The RainPerHourCounter is the index for the array RainPerHour, which can hold 24 values. But the index is set to the millis() value, which can have a value abouve 23. This causes a buffer overflow. After the first hour, the index is reset and from thereon the register SensorRainIreg holds the proper rainfall value. The solution is that the variable HourTimer should be set to the current millis() value in setup().
```
-- ts = millis();
-- RainPerHourCounter = ts;
++ ts = millis();
++ HourTimer = ts;
```
## Reset firmware via ModBus coil bit ## Reset firmware via ModBus coil bit
Soemtimes the weater station needs to be reset. For example if the I2C communication with the sensors is lost. The pressure sensor tends to have this probem occacionally. Soemtimes the weater station needs to be reset. For example if the I2C communication with the sensors is lost. The pressure sensor tends to have this probem occacionally.
## Implement support for new humidity sensor ## Implement support for new humidity sensor [done - 2024-01-14]
Heater function of former sensor needs to be disabled as the new sensor does not have (or need) a heater. Heater function of former sensor needs to be disabled as the new sensor does not have (or need) a heater.

Loading…
Cancel
Save