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

Method setRange

src/XInput.cpp:549–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549void XInputController::setRange(XInputControl ctrl, int32_t rangeMin, int32_t rangeMax) {
550 if (rangeMin >= rangeMax) return; // Error: Max < Min
551
552 Range * range = getRangeFromEnum(ctrl);
553 if (range == nullptr) return; // Not an addressable range
554
555 range->min = rangeMin;
556 range->max = rangeMax;
557}
558
559// Resets class back to initial values
560void XInputController::reset() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected