Dosing Pump Offset

Expansion modules and attachments
Post Reply
clw143
Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana

Dosing Pump Offset

Post 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.
clw143
Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana

Re: Dosing Pump Offset

Post 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?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Dosing Pump Offset

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

Re: Dosing Pump Offset

Post 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());
Roberto.
Post Reply