Quote:
|
Originally Posted by Stormhammer
your gonna have to explain that. The guy thats programming is a new guy on the team, he knows C and that, but yeah, just want to make sure there aren't any confusions anywhere. Thanks
|
void Default_Routine(void)
Code:
void Default_Routine(void)
{
//...
/*---------- 1 Joystick Drive --------------------------
*----------------------------------------------------
* This code mixes the Y and X axis on Port 1 to allow one joystick drive.
* Joystick forward = Robot forward
* Joystick backward = Robot backward
* Joystick right = Robot rotates right
* Joystick left = Robot rotates left
* Connect the right drive motors to PWM13 and/or PWM14 on the RC.
* Connect the left drive motors to PWM15 and/or PWM16 on the RC.
*/
pwm13 = pwm14 = Limit_Mix(2000 + p1_y + p1_x - 127);
pwm15 = pwm16 = Limit_Mix(2000 + p1_y - p1_x + 127);
//...
}
Of course, my thought is to use X for left and Y for right. But that's counter-intuitve. Really counter-intuitive