Page 1 of 1

Dosing Pump Offset

Posted: Fri Dec 12, 2014 5:33 pm
by clw143
Where can I change the dosing pump offset from Dosing Pump 1 (0 minutes offset) and Dosing Pump 2 (5 minutes offset), I want the offset now at x:00 and x:05 time to be x:30 and x:35 and keep it in memory, not hard code it so I can use the portal.

Re: Dosing Pump Offset

Posted: Fri Dec 12, 2014 5:53 pm
by clw143

Code: Select all

void ReefAngelClass::DosingPumpRepeat1(byte Relay)
{
	// 0 minute offset
	DosingPumpRepeat(Relay, 0,
			InternalMemory.DP1RepeatInterval_read(),
			InternalMemory.DP1Timer_read());
}

void ReefAngelClass::DosingPumpRepeat2(byte Relay)
{
	// 5 minute offset
	DosingPumpRepeat(Relay, 5,
			InternalMemory.DP2RepeatInterval_read(),
			InternalMemory.DP2Timer_read());
}
Would I actually have to change it in ReefAngel.ccp?

Re: Dosing Pump Offset

Posted: Fri Dec 12, 2014 6:20 pm
by lnevo
Make your own function inside your INO. Copy this one as a template and rename it. Take out the ReefAngelClass:: part. Like so

void myDosingPumpRepeat(byte Relay) {
//do what you want
}

Re: Dosing Pump Offset

Posted: Fri Dec 12, 2014 6:21 pm
by rimai
If you are using internal memory settings, they are hard coded to 0 and 5.
But, if you use your own function, you can have it 30 and 35.
Use like this:

Code: Select all

// For Pump 1
// 30 minute offset
   ReefAngel.DosingPumpRepeat(Port1, 30,
         InternalMemory.DP1RepeatInterval_read(),
         InternalMemory.DP1Timer_read());

// For Pump 2
// 35 minute offset
   ReefAngel.DosingPumpRepeat(Port2, 35,
         InternalMemory.DP2RepeatInterval_read(),
         InternalMemory.DP2Timer_read());