Joystick test code