|
Re: Please help Program Relays in WindRiver....
Are you sure you attached the proper file? I don't see anything in there mentioning the joystick buttons or relay control.
Anyway, you have not described your goal completely. Do you want the motor to run only while a button is pressed? What do you want to happen when both buttons are pressed? Do you want the button to choose the direction and start the motor, but have the motor to continue to run after you release the button, and if so, do you ever want to be able to stop the motor and how do you want to do it? What do you want the motor to be doing when the robot is enabled at the beginning of the match?
The answers to these questions will influence the appropriate program structure for implementing what you want. It will probably be as simple as a pair of if statements, or an if/elseif/else.
|