Dosing Pump conflicts with Wavemaker
Re: Dosing Pump conflicts with Wavemaker
Looks like I've got some additions to make for my .20 release.
Re: Dosing Pump conflicts with Wavemaker
Oh, and that should also eliminate the need for some of those 'timer' variables which would therefore cut down on the code size. PLUS it will make adding on additional wavemakers and dosing pumps easier (like Don already said).
cool....i'll check it out and merge it on in to my master branch.
cool....i'll check it out and merge it on in to my master branch.
Re: Dosing Pump conflicts with Wavemaker
And this is the new Wavemaker():
Code: Select all
void ReefAngelClass::Wavemaker(byte WMRelay, byte WMTimer)
{
Relay.Set(WMRelay,(now()%(WMTimer*2))<WMTimer);
}
Roberto.
Re: Dosing Pump conflicts with Wavemaker
Here's what I've got for the new DosingPump function (non repeat function):
Doing it this way will completely eliminate the need for the TIMER function. That will also simplify the code, however the "long" form code signatures will change thus breaking some PDE/INO files. Oh well, it happens and is an easy fix.
Code: Select all
void ReefAngelClass::DosingPump(byte DPRelay, byte OnHour, byte OnMinute, byte RunTime)
{
Relay.Set(DPRelay, (now()%((OnHour*3600)+(OnMinute*60)))<RunTime);
}
Re: Dosing Pump conflicts with Wavemaker
Right. The Set function would supplement the On and Off functions for when you have a boolean indicating that you want On or Off.binder wrote:I'm all open for suggestions. I had issues when creating the repeatdosinginterval stuff. I didn't know how much it was being used either. I'm going to look at the code suggestions you gave and try to follow them more. I've only glanced at them briefly and my brain isn't fully functioning and grasping it yet. But that should easily be remedied.
And as for the Set function...making sure i follow properly, that is supposed to take the place of the "if else" clause, right?