Dosing Pump conflicts with Wavemaker

Requests for new functions or software apps
User avatar
Posts: 2732
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Fri Jan 06, 2012 8:58 pm
Looks like I've got some additions to make for my .20 release. :)

Posts: 12201
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Fri Jan 06, 2012 8:59 pm
I'm going to have these on the dev branch for you :)
Roberto.
User avatar
Posts: 2732
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Fri Jan 06, 2012 9:01 pm
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. :)

Posts: 12201
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Fri Jan 06, 2012 9:13 pm
And this is the new Wavemaker():
Code: Select all
void ReefAngelClass::Wavemaker(byte WMRelay, byte WMTimer)
{
  Relay.Set(WMRelay,(now()%(WMTimer*2))<WMTimer);
}
Roberto.
User avatar
Posts: 2732
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Wed Jan 11, 2012 4:57 pm
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.

Posts: 139
Joined: Tue Oct 04, 2011 5:49 am
PostPosted: Wed Jan 18, 2012 12:48 pm
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.
Previous

Return to Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron