playAbilityTech/Arduino-JoyCon-Library-for-Nintendo-Switch

No Dpad

Closed this issue · 1 comments

Hello, i have testes your software and didn't find the dpad number code, Are they implemented yet?

Hi @D3adPlays, yes you can use Joystick.setHatSwitch(int16_t value). The value is from 0° to 360°, but in 45° increments.

Joystick.setHatSwitch(0); // UP
Joystick.setHatSwitch(90); // RIGHT
Joystick.setHatSwitch(180); // DOWN
Joystick.setHatSwitch(270); // LEFT

Joystick.setHatSwitch(-1); // RELEASE