Page 1 of 1

Re: Dosing Pump conflicts with Wavemaker

Posted: Fri Jan 06, 2012 8:58 pm
by binder
Looks like I've got some additions to make for my .20 release. :)

Re: Dosing Pump conflicts with Wavemaker

Posted: Fri Jan 06, 2012 8:59 pm
by rimai
I'm going to have these on the dev branch for you :)

Re: Dosing Pump conflicts with Wavemaker

Posted: Fri Jan 06, 2012 9:01 pm
by binder
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. :)

Re: Dosing Pump conflicts with Wavemaker

Posted: Fri Jan 06, 2012 9:13 pm
by rimai
And this is the new Wavemaker():

Code: Select all

void ReefAngelClass::Wavemaker(byte WMRelay, byte WMTimer)
{
  Relay.Set(WMRelay,(now()%(WMTimer*2))<WMTimer);
}

Re: Dosing Pump conflicts with Wavemaker

Posted: Wed Jan 11, 2012 4:57 pm
by binder
Here's what I've got for the new DosingPump function (non repeat function):

Code: Select all

void ReefAngelClass::DosingPump(byte DPRelay, byte OnHour, byte OnMinute, byte RunTime)
{
    Relay.Set(DPRelay, (now()%((OnHour*3600)+(OnMinute*60)))<RunTime);
}
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.

Re: Dosing Pump conflicts with Wavemaker

Posted: Wed Jan 18, 2012 12:48 pm
by dedvalson
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?
Right. The Set function would supplement the On and Off functions for when you have a boolean indicating that you want On or Off.