Quote:
Originally Posted by GeeTwo
I see two issues:
First, you called relay.set(Relay.Value.kOff); This essentially disables the relay; it won't let either the forward or re reverse direction be enabled. The relay.set is usually called in the initialize method, unless the way in which it operates changes for different parts of the program.
Second, you don't have any way to turn the relay off. The if statement that wraps the relay.setDirection() should have an else case that does this.
|
I think you're making the same mistake the OP did. setDirection() is called once (if at all) to initialize the allowable directions, while set changes the physical state of the relay.