Locking ports
Re: Locking ports
bumplnevo wrote:Ok need a check on my binary math..I have everything in place just need to verify the following..
OverridePorts = B00110010
RelayMaskOff |= OverridePorts;
RelayMaskOn &= ~OverridePorts;
I think that should do it...
Thanks for the review
Re: Locking ports
I see you used "OverridePorts" as the variable name. This to me sounds like the ports that you can override. I'm thinking this is the opposite of what you were intending. The ports you specify are the ones that are Locked and not able to be overridden, correct? Or do I have this backwards?
Re: Locking ports
The principle was that if you Override the ports they can not be masked... the override will block the relaymask.
The idea was to override the user input and only allow the programming of the ports via on/off.
Sorry for the confusing naming... the pull request is already put in and the whole process confuses the hell out of me. Feel free to change the names, functions, whatever.
The idea was to override the user input and only allow the programming of the ports via on/off.
Sorry for the confusing naming... the pull request is already put in and the whole process confuses the hell out of me. Feel free to change the names, functions, whatever.
Re: Locking ports
I "think" it looks correct but Roberto should be able to confirm. I always get confused when looking at the relayon/off masks for some reason.lnevo wrote:How about the math?
Re: Locking ports
Nope I can't load my code until I get some additional hardware because I've mode a hundred million changes But I put the changes right before the Relay.Write and it all compiles. I'm pretty confident
Re: Locking ports
Tested. Working Sending you a diff patch because me and git have issues!
Re: Locking ports
<aside>You're not alone... using git is like having my teeth pulled</aside>
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel