mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
- GenericHID is now concrete, and has only getRawAxis/Button(int) functionality - getXxx() has been moved into Joystick as that's the only place where it makes sense - Hand (and therefore getXxx(Hand)) has been removed, replaced by specific getLeft/RightXxx() methods in XboxController and the new PS4Controller class - C++ ::Button:: and ::Axis:: enums have been converted to identically-namespaced static constexpr ints
33 lines
1017 B
C++
33 lines
1017 B
C++
// Copyright (c) FIRST and other WPILib contributors.
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
#include "frc/XboxController.h" // NOLINT(build/include_order)
|
|
|
|
#include "JoystickTestMacros.h"
|
|
#include "frc/simulation/XboxControllerSim.h"
|
|
#include "gtest/gtest.h"
|
|
|
|
using namespace frc;
|
|
|
|
BUTTON_TEST(XboxController, LeftBumper)
|
|
BUTTON_TEST(XboxController, RightBumper)
|
|
|
|
BUTTON_TEST(XboxController, LeftStickButton)
|
|
BUTTON_TEST(XboxController, RightStickButton)
|
|
|
|
BUTTON_TEST(XboxController, AButton)
|
|
BUTTON_TEST(XboxController, BButton)
|
|
BUTTON_TEST(XboxController, XButton)
|
|
BUTTON_TEST(XboxController, YButton)
|
|
BUTTON_TEST(XboxController, BackButton)
|
|
BUTTON_TEST(XboxController, StartButton)
|
|
|
|
AXIS_TEST(XboxController, LeftX)
|
|
AXIS_TEST(XboxController, RightX)
|
|
AXIS_TEST(XboxController, LeftY)
|
|
AXIS_TEST(XboxController, RightY)
|
|
|
|
AXIS_TEST(XboxController, LeftTriggerAxis)
|
|
AXIS_TEST(XboxController, RightTriggerAxis)
|