Lines Matching refs:axisInfo
37 addMotionRange(axis.axisInfo.axis, axis, info); in populateDeviceInfo()
39 if (axis.axisInfo.mode == AxisInfo::MODE_SPLIT) { in populateDeviceInfo()
40 addMotionRange(axis.axisInfo.highAxis, axis, info); in populateDeviceInfo()
76 const char* label = InputEventLookup::getAxisLabel(axis.axisInfo.axis); in dump()
80 dump += StringPrintf(INDENT4 "%d", axis.axisInfo.axis); in dump()
82 if (axis.axisInfo.mode == AxisInfo::MODE_SPLIT) { in dump()
83 label = InputEventLookup::getAxisLabel(axis.axisInfo.highAxis); in dump()
85 dump += StringPrintf(" / %s (split at %d)", label, axis.axisInfo.splitValue); in dump()
87 dump += StringPrintf(" / %d (split at %d)", axis.axisInfo.highAxis, in dump()
88 axis.axisInfo.splitValue); in dump()
90 } else if (axis.axisInfo.mode == AxisInfo::MODE_INVERT) { in dump()
124 AxisInfo axisInfo; in reconfigure() local
125 const bool explicitlyMapped = !getDeviceContext().mapAxis(abs, &axisInfo); in reconfigure()
129 axisInfo.mode = AxisInfo::MODE_NORMAL; in reconfigure()
130 axisInfo.axis = -1; in reconfigure()
132 mAxes.insert({abs, createAxis(axisInfo, rawAxisInfo, explicitlyMapped)}); in reconfigure()
149 if (axis.axisInfo.axis < 0) { in reconfigure()
156 axis.axisInfo.axis = nextGenericAxisId; in reconfigure()
172 JoystickInputMapper::Axis JoystickInputMapper::createAxis(const AxisInfo& axisInfo, in createAxis() argument
176 int32_t rawFlat = axisInfo.flatOverride < 0 ? rawAxisInfo.flat : axisInfo.flatOverride; in createAxis()
184 if (axisInfo.mode == AxisInfo::MODE_SPLIT) { in createAxis()
185 scale = 1.0f / (axisInfo.splitValue - rawAxisInfo.minValue); in createAxis()
186 highScale = 1.0f / (rawAxisInfo.maxValue - axisInfo.splitValue); in createAxis()
187 } else if (isCenteredAxis(axisInfo.axis)) { in createAxis()
206 return Axis(rawAxisInfo, axisInfo, explicitlyMapped, scale, offset, highScale, highOffset, min, in createAxis()
213 if (axis.axisInfo.axis == axisId || in haveAxis()
214 (axis.axisInfo.mode == AxisInfo::MODE_SPLIT && axis.axisInfo.highAxis == axisId)) { in haveAxis()
270 switch (axis.axisInfo.mode) { in process()
277 if (rawEvent.value < axis.axisInfo.splitValue) { in process()
278 newValue = (axis.axisInfo.splitValue - rawEvent.value) * axis.scale + in process()
281 } else if (rawEvent.value > axis.axisInfo.splitValue) { in process()
284 (rawEvent.value - axis.axisInfo.splitValue) * axis.highScale + in process()
332 setPointerCoordsAxisValue(&pointerCoords, axis.axisInfo.axis, axis.currentValue); in sync()
333 if (axis.axisInfo.mode == AxisInfo::MODE_SPLIT) { in sync()
334 setPointerCoordsAxisValue(&pointerCoords, axis.axisInfo.highAxis, in sync()
382 if (axis.axisInfo.mode == AxisInfo::MODE_SPLIT) { in filterAxes()