Rename Joystick default channel constants (#904)

The new naming makes it more clear that the constants are intended to be used
with the channel setters.
This commit is contained in:
Tyler Veness
2018-05-16 19:53:16 -07:00
committed by Peter Johnson
parent 630fc55bde
commit 64b03704f8
4 changed files with 36 additions and 13 deletions

View File

@@ -27,11 +27,11 @@ constexpr double kPi = 3.14159265358979323846;
* (0-5).
*/
Joystick::Joystick(int port) : GenericHID(port) {
m_axes[Axis::kX] = kDefaultXAxis;
m_axes[Axis::kY] = kDefaultYAxis;
m_axes[Axis::kZ] = kDefaultZAxis;
m_axes[Axis::kTwist] = kDefaultTwistAxis;
m_axes[Axis::kThrottle] = kDefaultThrottleAxis;
m_axes[Axis::kX] = kDefaultXChannel;
m_axes[Axis::kY] = kDefaultYChannel;
m_axes[Axis::kZ] = kDefaultZChannel;
m_axes[Axis::kTwist] = kDefaultTwistChannel;
m_axes[Axis::kThrottle] = kDefaultThrottleChannel;
HAL_Report(HALUsageReporting::kResourceType_Joystick, port);
}