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

Method setJoystick

src/XInput.cpp:273–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273void XInputController::setJoystick(XInputControl joy, int32_t x, int32_t y) {
274 const XInputMap_Joystick * joyData = getJoyFromEnum(joy);
275 if (joyData == nullptr) return; // Not a joystick
276
277 x = rescaleInput(x, *getRangeFromEnum(joy), XInputMap_Joystick::range);
278 y = rescaleInput(y, *getRangeFromEnum(joy), XInputMap_Joystick::range);
279
280 setJoystickDirect(joy, x, y);
281}
282
283void XInputController::setJoystickX(XInputControl joy, int32_t x, boolean invert) {
284 const XInputMap_Joystick * joyData = getJoyFromEnum(joy);

Callers

nothing calls this directly

Calls 1

getJoyFromEnumFunction · 0.85

Tested by

no test coverage detected