Open Andi-Fwd opened 1 year ago
I can confirm this issue.
Thank you for your work in discovering the problem. I will update our code to match your proposal, and report back my results.
Deployed and confirmed.
@Andi-Fwd Your code revisions appear to have resolved this bug for me.
Thank you for solving a problem I identified 3 months ago, and invested zero time into finxing myself!
Thanks for reporting the issue and proposing the solution. I've verified it and integrated your change to the dev/221_1 branch so it will be released in the next firmware 2.2.1(1): https://github.com/OpenSprinkler/OpenSprinkler-Firmware/commit/bc4cf8456d632b4f503e0ae2b2d5f7fabe808a6f This issue will be closed when that branch is released.
While testing the firmware 2.2.0(2) I came across a bug in the station scheduler which happens when the following settings are used:
The problem is caused by the function
void schedule_all_stations(ulong curr_time)
in main.cpp. After each station is scheduled thehandle_master_adjustments(curr_time, q)
is performed. This updates correctly the station start time but theseq_start_times[gid]
array is not updated. Hence the 2nd station in the same group is scheduled with an overlapping runtime to the 1st station.Solution: update
void handle_master_adjustments
to correct also the seq_start_times[ ] array for the subsequent stations.Proposed code change: