New DCPump Modes - How to code???
Re: New DCPump Modes - How to code???
You could also use ShortPulse mode. It's like LongPulse but with duration in ms.
--Colin
--Colin
Re: New DCPump Modes - How to code???
Lee,lnevo wrote:You need 3 arguments to SetMode separated by a comma. Mode Speed and Duration. The first only has 2 and no comma and the second, that code block represents one argument and it represents a speed.ReefAngel.DCPump.SetMode(TidalSwell 55); and
ReefAngel.DCPump.SetMode(millis();1200>750?50:0);
Try this:
ReefAngel.DCPump.SetMode(TidalSwell,55,0);
ReefAngel.DCPump.SetMode(Constant,millis();1200>750?50:0,0);
I realised I had missed the comma in all the wave settings when I posted this on the forum. In my laptop the commas are there. I'll insert codes for TidalSwell and millis and let you know how it compiles and runs the pumps.
Thank you very much.
Dr Davaraj
Re: New DCPump Modes - How to code???
Lee,lnevo wrote:You need 3 arguments to SetMode separated by a comma. Mode Speed and Duration. The first only has 2 and no comma and the second, that code block represents one argument and it represents a speed.ReefAngel.DCPump.SetMode(TidalSwell 55); and
ReefAngel.DCPump.SetMode(millis();1200>750?50:0);
Try this:
ReefAngel.DCPump.SetMode(TidalSwell,55,0);
ReefAngel.DCPump.SetMode(Constant,millis();1200>750?50:0,0);
ReefAngel.DCPump.SetMode(Constant,millis();1200>750?50:0,0); gives error, but
ReefAngel.DCPump.SetMode(Constant,millis()%1200>750?50:0,0); compiles without error.
Re: New DCPump Modes - How to code???
Should be millis()% i copied and pasted and didnt notice the mistake. Good catch
Re: New DCPump Modes - How to code???
I have this code set for Else mode.
ReefAngel.DCPump.SetMode(Else,50,20);
So the pump should ramp up and down from 30% to 70%, randomly. However, mine goes from 30% to 90% . Is there something wrong with the code or is that how the pump will work?
Dr Davaraj
ReefAngel.DCPump.SetMode(Else,50,20);
So the pump should ramp up and down from 30% to 70%, randomly. However, mine goes from 30% to 90% . Is there something wrong with the code or is that how the pump will work?
Dr Davaraj
Re: New DCPump Modes - How to code???
The DCPump defaults for ElseMode is going to be equal to the speed. So for 50 it will be 50. For anything greater than 50, the speed will be 100-speed.
Re: New DCPump Modes - How to code???
case Else:
{
int offset = DCPump.Speed;
if (DCPump.Speed > 50) offset = 100 - DCPump.Speed;
SyncSpeed=ElseMode(DCPump.Speed,offset,true);
AntiSyncSpeed=ElseMode(DCPump.Speed,offset,false);
break;
}
Re: New DCPump Modes - How to code???
That's not really how it's intended to work. The range should be speed plus or minus offset.
Re: New DCPump Modes - How to code???
AlanM added ElseMode to the libraries. And yes, I agree with you Colin. What do you think would be a good defaults for ElseMode in the libraries? We can easily modify this.
Re: New DCPump Modes - How to code???
ReefAngel.DCPump.UseMemory=false;rimai wrote:Are you using memory settings set to true or false?
Re: New DCPump Modes - How to code???
I've got a fix for it. I'll submit it shortly.lnevo wrote:AlanM added ElseMode to the libraries. And yes, I agree with you Colin. What do you think would be a good defaults for ElseMode in the libraries? We can easily modify this.
--Colin
Re: New DCPump Modes - How to code???
Anyone have any follow up on this? I am having this same problem.