forked from JeetShetty/GreenPiThumb
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging SoilMoisturePoller and WateringEventPoller
It turns out things are a lot simpler when we combine the poller for checking soil moisture with the poller responsible for running the pump based on soil moisture. Now, the SoilWateringPoller can check soil moisture, store the record in the DB, but then use the same reading to determine if it needs to pump water. Because of this, we can get rid of the get_latest method on SoilMoistureStore, which is nice because now all the DbStore classes have the exact sameinterface and we can delete the old SoilMoisturePoller and not add much code to the former WateringEventPoller.
- Loading branch information
Showing
5 changed files
with
78 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters