So when it started, it was at 70% Daylight, 100% Actinic... As it dropped down from 70% Actinic would go up = % over 100.... So my Actinic pump is not on...
I think the issue is that they use a single static variable so having it called with different speeds like that may not work as expected...
This is something thats come up before and what we need to do is define an offset for the different pumps so that you set one speed and depending on the offset the speed can be adjusted accordingly.
Roberto, does that sound like the right assessment on using the function twice with different params?
Yes, we need the static variable to be able to keep it synced when using sync/antisync scheme.
That way, if you use the variables in each channel they go up and down at the same time and at the same rate. The drawback is that they need to be the same or it gets confused.
I will try and take a stab at adding an offset variable so that you can adjust the power of the anti-sync pump. A lot of people have mismatched pumps and have asked for that. This way we can maintain the static variable and not worry about it.
The other approach is to make each pump instance a seperate class and maintain an array of DCPumps so that each could have their own speed, mode, duration going, although by default we would use the same memory setting for all, it could allow users to use the custom mode or not use memory and set each pump independently.
I'll start with the former since thats the least intrusive, but long term we may want to think of the latter. This is actually the approach I want to go with for dosing pumps.
Ok, I went for a shower and was thinking about this issue when I realized that we don't need the static declarations.
This means that each function would be able to have it's own settings.
The key to this thing is instead of saving millis to sync both pumps in time, we can sync them from reboot of controller and modulo the duration to sync both pumps in time.
The whole reason of the static was to sync them in time.
What do you think?
That should work but still doesn't allow for different speed settings for those using the DCPump class, so there still may be a need for offset settings, but at least that would help people set their channels manually without conflict.
I'm interested in this as well. I have a WP-40 and WP-25. It would be great to be able to distinguish an offset amplitude between the two. Keep me posted!