internal memory

Basic / Standard Reef Angel hardware
Post Reply
riggeek
Posts: 113
Joined: Wed Sep 12, 2012 8:41 am

internal memory

Post by riggeek »

Looking thou other people code for the Jeabo DC pump has lead me to a question.

If I use code like what is listed be low. Will I still be able to switch pump modes or will this hard lock the code to what is programmed? Would I need to used some sorta 1 shot to set the mode?

I would like to use short pulse pump mode in the day and constant at night with the refugium light being on as the trigger. As well as a nutrient transport mode after feeding.

part of Sacohen code

// Set timer when in feeding mode
static unsigned long feeding;
if (ReefAngel.DisplayedMenu==FEEDING_MODE) feeding=now();

if (now()-feeding<3600) {
// Continue NTM for the 60 minutes
ReefAngel.DCPump.UseMemory=false;
ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
ReefAngel.DCPump.Mode=NutrientTransport
} else if (now()%SECS_PER_DAY<43200 || now()%SECS_PER_DAY>=79200) { // 12pm / 10pm
// Night mode (go to 30%)
ReefAngel.DCPump.UseMemory=false;
ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
ReefAngel.DCPump.Mode=Constant;
ReefAngel.DCPump.Speed=30;
} else if (InternalMemory.DCPumpMode_read()==11) {
// Custom Mode and nothing else going on
ReefAngel.DCPump.UseMemory=false;
ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
ReefAngel.DCPump.Mode=modes[rmode]; // Put the mode to the random mode :)
ReefAngel.DCPump.Speed=InternalMemory.DCPumpSpeed_read(); // Set speed from portal
} else {
ReefAngel.DCPump.UseMemory=true; // Will reset all values from memory
}

thanks

riggeek
riggeek

Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: internal memory

Post by lnevo »

In that code the night and feeding mode trump the portal but it only does the random mode per day when you've selected Custom mode.
riggeek
Posts: 113
Joined: Wed Sep 12, 2012 8:41 am

Re: internal memory

Post by riggeek »

So how would you go about setting the code, but not trumping if it is changed in the portal?


riggeek
riggeek

Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: internal memory

Post by lnevo »

Thats how it is set...
Post Reply