broken feeding mode

Share you PDE file with our community
User avatar
Posts: 5328
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Oct 14, 2013 12:04 pm
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
Posts: 5328
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Oct 14, 2013 12:04 pm
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.

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Sun Oct 20, 2013 6:25 pm
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
Posts: 5328
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Oct 20, 2013 7:52 pm
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
Posts: 5328
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Oct 20, 2013 7:53 pm
In both sections..

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Sun Oct 20, 2013 8:22 pm
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.

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Mon Oct 21, 2013 9:23 am
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
Posts: 5328
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Oct 21, 2013 9:46 am
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

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Mon Oct 21, 2013 11:51 am
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.

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Thu Oct 24, 2013 7:31 pm
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.
Previous

Return to My PDE/INO file

Who is online

Users browsing this forum: No registered users and 2 guests