Reverse flag for RA_ATOClass

Requests for new functions or software apps
User avatar
Posts: 5361
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Mar 30, 2013 5:42 am
Ok, yeah I see that the #define does not get into the scope from the INO, I guess it needs to be explicitly declared in that file through the include of ReefAngel_Features.h through Globals.h. Anyway, I'll see what I can do later about the push request and adding the functions and keywords. That part seems pretty straightforward..
User avatar
Posts: 5361
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Mar 30, 2013 7:24 am
I can't get it to recognize the keywords :(

Added to feature.txt
Code: Select all
REVERSE_ATO_LOW,ReefAngel.ReverseATOLow
REVERSE_ATO_HIGH,ReefAngel.ReverseATOHigh


Added to keywords.txt
Code: Select all
ReverseATOLow KEYWORD2
ReverseATOHigh KEYWORD2


Added to ReefAngel.h
Code: Select all
        void inline ReverseATOLow() {};
        void inline ReverseATOHigh() {};


Added to debug sketch
Code: Select all
    ReefAngel.ReverseATOHigh();


But it's not picking up and adding to the ReefAngel_Features.h. Anything I'm missing?
User avatar
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis
PostPosted: Sat Mar 30, 2013 9:33 am
Following along...I was wanting to do something similar http://forum.reefangel.com/viewtopic.php?f=20&t=1542. I have mine set up in a StandardATO format and it just seems more logical to me for the status to appear green if the water level is above the low float (closed position). It's become less important now with the water level expansion, but it would still be nice.

Jon

Posts: 12288
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Mar 30, 2013 9:40 am
You are missing a description on the feature.txt file
Code: Select all
REVERSE_ATO_LOW,ReefAngel.ReverseATOLow,Inverted Low Float Switch
REVERSE_ATO_HIGH,ReefAngel.ReverseATOHigh,Inverted High Float Switch

That's what it will display on the Arduino IDE when you compile the code as features found.
See if it works now.
Roberto.
User avatar
Posts: 5361
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Mar 30, 2013 9:41 am
Got it. I'll try when i get home!
User avatar
Posts: 5361
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Mar 30, 2013 7:40 pm
The pull request is in...i need to fix it though! I left a bit of decode in that isActive wont be declared unless its defined...

Also the feature.txt is not in the repo...
User avatar
Posts: 5361
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Mar 30, 2013 8:14 pm
Ok, pull request should be good now. There should be 3 commits.
User avatar
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL
PostPosted: Mon Jul 01, 2013 8:37 am
I'm going to have 2 float switches in parallel basically set up to disable the ATO when the water level is to high ineither area.

Due to space issues I need to set up my ATO float switches in reverse.
Where the float is down and the wires are at the top.

Like this...

Image

If I do this I can use the following code to reverse the ATO Flag?

Code: Select all
class RA_ATOHighClass : public RA_ATOClass
{
public:
#ifdef REVERSE_HIGH_ATO
    inline bool IsActive() { return digitalRead(highATOPin); }
#else
    inline bool IsActive() { return !digitalRead(highATOPin); }
#endif
};
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Mon Jul 01, 2013 8:47 am
You can also pull the plastic clip off the bottom and flip the float upside down to change it.

Sent from my HTC One X using Tapatalk 4 Beta
User avatar
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL
PostPosted: Mon Jul 01, 2013 9:03 am
I saw that from Roberto after I posted the question and I did that. It seems a lot easier to me.

Thanks.
PreviousNext

Return to Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron