Matty is right, but they do vary slightly when in analogue or digital mode.
In analogue mode:
Left stick: JoyX/Y
Right stick: JoyR/Z
D-Pad: JoyHat
In digital mode:
Left stick: JoyHat
Right stick: JoyR/Z
D-Pad: JoyX/Y
The JoyHat command returns a float value between 0 and 1, which starts at 0 for up, 0.25 for right, 0.5 for down, 0.75 for left, and values for each of the remaining 4 diagonals. -1 is returned when no direction is being pressed.
Also note that the button that switches between digital/analogue modes will also be mapped to one of the buttons, so will always be in it's on state when in digital mode (possibly analogue). This is likely to be button 10 on a 10 button gamepad (buttons are numbered from 0) or the number after the standard buttons.
In analogue mode:
Left stick: JoyX/Y
Right stick: JoyR/Z
D-Pad: JoyHat
In digital mode:
Left stick: JoyHat
Right stick: JoyR/Z
D-Pad: JoyX/Y
The JoyHat command returns a float value between 0 and 1, which starts at 0 for up, 0.25 for right, 0.5 for down, 0.75 for left, and values for each of the remaining 4 diagonals. -1 is returned when no direction is being pressed.
Also note that the button that switches between digital/analogue modes will also be mapped to one of the buttons, so will always be in it's on state when in digital mode (possibly analogue). This is likely to be button 10 on a 10 button gamepad (buttons are numbered from 0) or the number after the standard buttons.