uCautomation / plant-watering-system

Automated plant watering system
MIT License
0 stars 0 forks source link

Plant enable state should be persistent after reset #8

Closed eddyp closed 3 years ago

eddyp commented 3 years ago

Is your feature request related to a problem? Please describe. If a plant is disabled, after reset it must keep that state, otherwise the system will water it based on whatever is in calibration information.

Describe the solution you'd like Since there are 4 modules, it might make sense to use 1 bit per module, so the whole enable state of the system takes 4 bits plus 1 more to mark the data as valid, similar to how wear leveling does.

Another option would be to use the other 4 bits in a byte for other configurable option such as how much time the pumps should stay on at one watering cycle (now value is hard coded).

eddyp commented 3 years ago

There were actually 2 more bits unused in the compactedRefs, so bit 31 gets used for that info now.