Dosing Pump conflicts with Wavemaker

Requests for new functions or software apps
Post Reply
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Dosing Pump conflicts with Wavemaker

Post by binder »

Looks like I've got some additions to make for my .20 release. :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Dosing Pump conflicts with Wavemaker

Post by rimai »

I'm going to have these on the dev branch for you :)
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Dosing Pump conflicts with Wavemaker

Post 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. :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Dosing Pump conflicts with Wavemaker

Post 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);
}
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Dosing Pump conflicts with Wavemaker

Post 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.
dedvalson
Posts: 140
Joined: Tue Oct 04, 2011 5:49 am

Re: Dosing Pump conflicts with Wavemaker

Post 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.
Post Reply