OpenSprinkler › Forums › OpenSprinkler Unified Firmware › 200% watering because of -9999 precip today › Reply To: 200% watering because of -9999 precip today
June 10, 2016 at 5:41 pm
#42934
Ray
Keymaster
You are totally right: I just found this independently a couple days ago, and the fix is to simply flip the conditional operator:
https://github.com/OpenSprinkler/OpenSprinkler-Weather/commit/bf538ab0854a85ce6461772be1ef4e1d5a16f0bf
because NaN compared to anything would return false, the fixed code will assign 0 to the precipitation data if it’s NaN. The code has already been deployed. Let me know if you’ve observed any changes on the watering percentage on your side.