We use some robot reversal code:
Code:
'--------------------------------------------------------------------------
'| The following code reverses joystick directoin |
'| p1_sw_top[reverse jdriection];pwm1,pwm2[motor speed/direction]
'--------------------------------------------------------------------------
' it'll be confusing as hell
' but oh well
' =)
'How to Swap the Iinformation in Two Variables Without Using a Third Variable!:
'or: XOR is Your Friend =)
if p3_sw_top then forwards:
'---swap right and left pwms
PWM1 = PWM1 ^ PWM2
PWM2 = PWM1 ^ PWM2
PWM1 = PWM1 ^ PWM2
'---invert values of joysticks around 127
'------Thanks to Joe Ross from team 340! :D
PWM1 = ( 254 - PWM1 )
PWM2 = ( 254 - PWM2 )
forwards:
It's not elaborate, or even too important, but I'm really proud of it...