| 207 | } |
| 208 | |
| 209 | float XboxOneController::NormalizeTrigger(uint8_t deadzonePercent, uint16_t value) |
| 210 | { |
| 211 | uint16_t deadzone = (TRIGGER_MAXVALUE * deadzonePercent) / 100; |
| 212 | //If the given value is below the trigger zone, save the calc and return 0, otherwise adjust the value to the deadzone |
| 213 | return value < deadzone |
| 214 | ? 0 |
| 215 | : static_cast<float>(value - deadzone) / (TRIGGER_MAXVALUE - deadzone); |
| 216 | } |
| 217 | |
| 218 | void XboxOneController::NormalizeAxis(int16_t x, |
| 219 | int16_t y, |
nothing calls this directly
no outgoing calls
no test coverage detected