I'm 99.9% sure its in there. Let me verify the syntax. I just saw someone post code that was using it at 1.0.9clw143 wrote:Right, I follow, BUT then why does the wizard make a Port8Bit? It should not exist. For my water change mode above, ports 3-8 are off and Port3Bit - Port8Bit are specified.
I have version 1.0.9
It has no idea what IsMaskOn is.
If Port On Then
Re: If Port On Then
Re: If Port On Then
It is in the stock 1.0.9 I just confirmed.
Take a look at the class definition for Relay.
http://www.easte.net/RA/html/class_relay_class.html#
The syntax should be:
or
Make sure to change X
Take a look at the class definition for Relay.
http://www.easte.net/RA/html/class_relay_class.html#
The syntax should be:
Code: Select all
ReefAngel.Relay.IsMaskOn(PortX);
Code: Select all
ReefAngel.Relay.IsMaskOff(PortX);
Re: If Port On Then
I was having some weird results and changed the code to this
Moonlights should be 100% if port 2 is on, and that is quite literally how it is working, if it is in "auto" or "off" it is in moonlight mode, if "on" it is 100%
How do I get them to work right in auto?
Code: Select all
// Dimmable royal blues 100% if actinics (relay port 2) are on, else moonlight
if (bitRead(ReefAngel.Relay.RelayMaskOn, Port1Bit)) ReefAngel.PWM.SetActinic( 100 );
else ReefAngel.PWM.SetActinic( MoonPhase()/2 );
How do I get them to work right in auto?
Re: If Port On Then
I try this:lnevo wrote:It is in the stock 1.0.9 I just confirmed.
Take a look at the class definition for Relay.
http://www.easte.net/RA/html/class_relay_class.html#
The syntax should be:orCode: Select all
ReefAngel.Relay.IsMaskOn(PortX);
Make sure to change XCode: Select all
ReefAngel.Relay.IsMaskOff(PortX);
Code: Select all
// Dimmable royal blues 100% if actinics (relay port 2) are on, else moonlight
if (ReefAngel.Relay.IsMaskOn(Port2);) ReefAngel.PWM.SetActinic( 100 );
else ReefAngel.PWM.SetActinic( MoonPhase()/2 );
Re: If Port On Then
Humm..
That may have been my fault.
I think I forgot to add the entries in the features.txt file.
Hey Lee, can you create an issue and include the entries that need to added?
That may have been my fault.
I think I forgot to add the entries in the features.txt file.
Hey Lee, can you create an issue and include the entries that need to added?
Roberto.
Re: If Port On Then
Its a lowercase is...sorry
ReefAngel.Relay.isMaskOn(Port)
My bad, no feature.txt required.
ReefAngel.Relay.isMaskOn(Port)
My bad, no feature.txt required.
Re: If Port On Then
This works
This is still off for auto when auto is on and off for off, and on for on. I need on when auto on. (if that's not a confusing statement)
rimai wrote:Use RelayData instead of RelayMaskOn
This is still off for auto when auto is on and off for off, and on for on. I need on when auto on. (if that's not a confusing statement)
Code: Select all
// Dimmable royal blues 100% if actinics (relay port 2) are on, else moonlight
if (ReefAngel.Relay.isMaskOn(Port2)) ReefAngel.PWM.SetActinic( 100 );
else ReefAngel.PWM.SetActinic( MoonPhase()/5 );