Re: Dosing Pump conflicts with Wavemaker
Posted: Fri Jan 06, 2012 8:58 pm
Looks like I've got some additions to make for my .20 release.
Community discussion about Reef Angel Controllers and reefing related subjects
http://forum.reefangel.com/
Code: Select all
void ReefAngelClass::Wavemaker(byte WMRelay, byte WMTimer)
{
Relay.Set(WMRelay,(now()%(WMTimer*2))<WMTimer);
}
Code: Select all
void ReefAngelClass::DosingPump(byte DPRelay, byte OnHour, byte OnMinute, byte RunTime)
{
Relay.Set(DPRelay, (now()%((OnHour*3600)+(OnMinute*60)))<RunTime);
}
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?