OpenSprinkler Forums OpenSprinkler Unified Firmware Average Water Level > 100% Reply To: Average Water Level > 100%

#63979

vk2tds
Participant

Hi Ray

Thanks for this. And sorry for the delay. I wanted to check the fix I came up with and see how well it worked. Once again, great work on OpenSprinkler. The more I use it, the more I really do love it.

In order to fix my issue with the weather algorithm providing greater than 100% (and in fact up to 200%), I have made a single line modification that is working for me. Rather than implementing a different weather algorithm, I have modified my code for getweather_callback() in weather.cpp. This is working really well for me, and dropping the water usage as appropriate.

        if (wt_errCode==0 && findKeyVal(p, tmp_buffer, TMP_BUFFER_SIZE, PSTR("scale"), true)) {

v = atoi(tmp_buffer);

                if (v > 100) v = 100; //vk2tds: Regardless of the value returned, limit it to 100%

if (v>=0 && v<=250 && v != os.iopts[IOPT_WATER_PERCENTAGE]) {

I just wanted to close the loop, and let others who may have this issue how I solved it. Thanks