MCPcopy Create free account
hub / github.com/dmadison/ArduinoXInput / getJoystickX

Method getJoystickX

src/XInput.cpp:397–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397int16_t XInputController::getJoystickX(XInputControl joy) const {
398 const XInputMap_Joystick * joyData = getJoyFromEnum(joy);
399 if (joyData == nullptr) return 0; // Not a joystick
400 return (tx[joyData->x_high] << 8) | tx[joyData->x_low];
401}
402
403int16_t XInputController::getJoystickY(XInputControl joy) const {
404 const XInputMap_Joystick * joyData = getJoyFromEnum(joy);

Callers

nothing calls this directly

Calls 1

getJoyFromEnumFunction · 0.85

Tested by

no test coverage detected