I’ve been using PROS for a few months now, and I have just come upon a problem. Whenever I upload the code, the program is almost always the same - the wheels respond to the opposite joystick, and they move reversed. I’ve tried everything I can think of…
Here’s the setup code:
void opcontrol() {
Motor ld (1, E_MOTOR_GEARSET_18, true);
Motor rd (10, E_MOTOR_GEARSET_18, false);
Controller controller (E_CONTROLLER_MASTER);
And here’s the actual code:
while (true) {
/* Drive */
ld.set_brake_mode(E_MOTOR_BRAKE_HOLD);
rd.set_brake_mode(E_MOTOR_BRAKE_HOLD);
while(1){
if(controller.get_analog(E_CONTROLLER_ANALOG_RIGHT_Y)){
rd.move(controller.get_analog(E_CONTROLLER_ANALOG_RIGHT_Y));
}
else if(controller.get_analog(E_CONTROLLER_ANALOG_LEFT_Y)){
ld.move(controller.get_analog(E_CONTROLLER_ANALOG_LEFT_Y));
}
else{
ld.move_velocity(0);
rd.move_velocity(0);
}
}
}
}
Would be great if anyone could help!