So, we've been having problems with some of our relays not working. I'm using the code that they give you for an example, because if it ain't broke, then don't fix it, right? Anyway, It seems like our relay is on (solid orange light all the time), and when I push the button to activate it in TeleOp, we hear it click, but nothing happens. Just to make sure that I'm not going insane, setting a relay to go forward, such as " example_relay.Set(Relay::kForward) " will also turn it on, right? I don't have to have an " example_relay.Set(Relay::kOn) " block nested with it, right? And for the record, it's quite possible that the issue is wiring. I just want to make sure everything is okay on my end. Here's the code, for those of you who need to see it:
Code:
bool forward = stick.GetRawButton(button2);
bool reverse = stick.GetRawButton(button3);
if (forward && reverse) {
arm_rotator.Set(Relay::kOn); }
else if (forward == true) { //Do I have to set it on in here, as well?
arm_rotator.Set(Relay::kForward); }
else if (reverse == true) { //And here?
arm_rotator.Set(Relay::kReverse); }
else {
arm_rotator.Set(Relay::kOff); }