MechaLib
The robust, all-in-one software library for MechaLeague Robots
Loading...
Searching...
No Matches
JoystickUtil Class Reference

#include <JoystickUtil.h>

Static Public Member Functions

static float deadbandMap (float x, float deadband, float in_min, float in_max, float out_min, float out_max)
 Maps a joystick input value with a deadband.

Member Function Documentation

◆ deadbandMap()

float JoystickUtil::deadbandMap ( float x,
float deadband,
float in_min,
float in_max,
float out_min,
float out_max )
inlinestatic

Maps a joystick input value with a deadband.

Parameters
xThe joystick input value.
deadbandThe deadband value.
in_minThe minimum of the input range.
in_maxThe maximum of the input range.
out_minThe minimum of the output range.
out_maxThe maximum of the output range.
Returns
The mapped joystick value with deadband applied.

The documentation for this class was generated from the following file: