What did you edit it to? It should be easy for you to take what you changed and adapt it to match the joystick mapping in the default code.
You can directly map the joystick value to a PWM, as they are both in the 0-255 range with 127 being "neutral" or "off." If you need to reverse the direction of a joystick to match your CIM configuration, you can just subtract the joystick axis from 255, like so:
Code:
pwm01 = p1_y; /* Left drive train maps directly from port 1 y axis to pwm01. */
pwm02 = 255 - p2_y; /* Right drive train does the same, but in reverse. */
To make things smoother (eliminate noise etc) you could use a lookup table to map joystick values.