broken feeding mode

Share you PDE file with our community
Post Reply
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: broken feeding mode

Post by lnevo »

If you set that location to true then reboot it should initialize the memory with the values in the init_memory() function...

But no usually you have to set them up beforehand. Init memory was a method i used when i changed all my locations around or if something gets corrupted and i need a mass reset
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: broken feeding mode

Post by lnevo »

rossbryant1956 wrote:lee is this why my mem locations are not being updated:

InternalMemory.write(Mem_B_ResetMemory,false);
That line ensures that init_memory runs only once.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: broken feeding mode

Post by rossbryant1956 »

I had some time today and finally ripped my code apart to find the culprit that was keeping my feeding mode from working. I checked all the hardware with the example code and that all checked out. I then went back to the wizard, wrote something very simple, and tested that feed and water change worked there. Finally I started putting it back together piece by piece until I found the issue.

Evidently when trying to adapt lee's code I have a mistake in these modules:

Code: Select all

       // Turn off DT_Pump if sump overflowing 
       
       static boolean DT_OverFillOverride=true;
       if (!ReefAngel.IO.GetChannel(0)) {
         if (!DT_OverFillOverride) {
         switchAlert.Send("DT_Tank+level+alarm!");
         ReefAngel.Relay.Override(DT_Pump,0);
         DT_OverFillOverride=true;
     } 
     } else {
        DT_OverFillOverride=false;
        ReefAngel.Relay.Override(DT_Pump,2);
     }  
     
        // Turn off GT_Pump if sump overflowing 
       
       static boolean GT_PumpOverFillOverride=true;
       if (!ReefAngel.IO.GetChannel(1)) {
         if (!GT_PumpOverFillOverride) {
         switchAlert.Send("GT_Tank+level+alarm!");
         ReefAngel.Relay.Override(GT_Pump,0);
         GT_PumpOverFillOverride=true;
     } 
     } else {
        GT_PumpOverFillOverride=false;
        ReefAngel.Relay.Override(GT_Pump,2);
     }  
My suspicion is that the two lines "ReefAngel.Relay.Override(PumpName, Number) are overriding the feed mode and water change mode command. Everything else turns off during the feed mode except those two pumps. It's almost like I need to enclose these routines in an if-then or something because those overrides seem to be firing regardless of the state of those float valves. Please help. Thx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: broken feeding mode

Post by lnevo »

It's the second one I think make it an else if and make sure it's not in feeding or cw modes.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: broken feeding mode

Post by lnevo »

In both sections..
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: broken feeding mode

Post by rossbryant1956 »

do you mean instead of:

} else {

we do

} else if {

that throws the error:

expected '(' before '{"

Would you be so kind as to write me a line or two so I can see what you mean? And Thx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: broken feeding mode

Post by rossbryant1956 »

please help. thx in advance.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: broken feeding mode

Post by lnevo »

You need to add the conditional..

If what?

Sorry i cant provide any code at the moment, but can you answer what would you like to ensure happens during the feeding and wc mode?

Lee
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: broken feeding mode

Post by rossbryant1956 »

thx very much. I will write some pseudo-code asap. Again Thanx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: broken feeding mode

Post by rossbryant1956 »

Just wanted everyone to know I found and fixed my bug, and I wanted you to meet him (or her!)

{

in the wrong place...just sitting there. As Lee said, there was no conditional being tested, therefore this routine was overriding everything. Anyway RA, thx to all for your help.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
Post Reply