mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
SCRIPT Run cc include replacements
This commit is contained in:
committed by
Peter Johnson
parent
f0a3c64121
commit
7c6efa41ae
@@ -11,12 +11,12 @@
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
#include <networktables/StringArrayTopic.h>
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include "wpi/nt/StringArrayTopic.hpp"
|
||||
|
||||
#include "frc/Alert.h"
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "frc/smartdashboard/SmartDashboard.h"
|
||||
#include "wpi/util/Alert.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
using namespace frc;
|
||||
using enum Alert::AlertType;
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "frc/AnalogPotentiometer.h"
|
||||
#include "frc/simulation/AnalogInputSim.h"
|
||||
#include "frc/simulation/RoboRioSim.h"
|
||||
#include "wpi/hardware/rotation/AnalogPotentiometer.hpp"
|
||||
#include "wpi/simulation/AnalogInputSim.hpp"
|
||||
#include "wpi/simulation/RoboRioSim.hpp"
|
||||
|
||||
namespace frc {
|
||||
using namespace frc::sim;
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "frc/DoubleSolenoid.h"
|
||||
#include "frc/PneumaticsControlModule.h"
|
||||
#include "frc/Solenoid.h"
|
||||
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
|
||||
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
|
||||
#include "wpi/hardware/pneumatic/Solenoid.hpp"
|
||||
|
||||
namespace frc {
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "frc/DoubleSolenoid.h"
|
||||
#include "frc/PneumaticsControlModule.h"
|
||||
#include "frc/Solenoid.h"
|
||||
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
|
||||
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
|
||||
#include "wpi/hardware/pneumatic/Solenoid.hpp"
|
||||
|
||||
namespace frc {
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/DriverStation.h"
|
||||
#include "frc/Joystick.h"
|
||||
#include "frc/simulation/DriverStationSim.h"
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/simulation/DriverStationSim.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
class IsJoystickConnectedParametersTest
|
||||
: public ::testing::TestWithParam<std::tuple<int, int, int, bool>> {};
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// 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/GenericHID.h>
|
||||
#include <frc/simulation/GenericHIDSim.h>
|
||||
#include "wpi/driverstation/GenericHID.hpp"
|
||||
#include "wpi/simulation/GenericHIDSim.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// 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/Joystick.h" // NOLINT(build/include_order)
|
||||
#include "wpi/driverstation/Joystick.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "JoystickTestMacros.h"
|
||||
#include "frc/simulation/JoystickSim.h"
|
||||
#include "JoystickTestMacros.hpp"
|
||||
#include "wpi/simulation/JoystickSim.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <wpi/MathExtras.h>
|
||||
#include <wpi/timestamp.h>
|
||||
#include "wpi/util/MathExtras.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
#include "frc/LEDPattern.h"
|
||||
#include "frc/MathUtil.h"
|
||||
#include "wpi/hardware/led/LEDPattern.hpp"
|
||||
#include "wpi/math/util/MathUtil.hpp"
|
||||
|
||||
namespace frc {
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/Notifier.h"
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "wpi/system/Notifier.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// 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/PS4Controller.h" // NOLINT(build/include_order)
|
||||
#include "wpi/driverstation/PS4Controller.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "JoystickTestMacros.h"
|
||||
#include "frc/simulation/PS4ControllerSim.h"
|
||||
#include "JoystickTestMacros.hpp"
|
||||
#include "wpi/simulation/PS4ControllerSim.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// 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/PS5Controller.h" // NOLINT(build/include_order)
|
||||
#include "wpi/driverstation/PS5Controller.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "JoystickTestMacros.h"
|
||||
#include "frc/simulation/PS5ControllerSim.h"
|
||||
#include "JoystickTestMacros.hpp"
|
||||
#include "wpi/simulation/PS5ControllerSim.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
#include <string_view>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <wpi/SmallString.h>
|
||||
#include <wpi/StringExtras.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
#include "wpi/util/SmallString.hpp"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/raw_ostream.hpp"
|
||||
|
||||
#include "frc/ScopedTracer.h"
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "wpi/system/ScopedTracer.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
TEST(ScopedTracerTest, Timing) {
|
||||
wpi::SmallString<128> buf;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/SharpIR.h"
|
||||
#include "frc/simulation/SharpIRSim.h"
|
||||
#include "wpi/hardware/range/SharpIR.hpp"
|
||||
#include "wpi/simulation/SharpIRSim.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "frc/DoubleSolenoid.h"
|
||||
#include "frc/PneumaticsControlModule.h"
|
||||
#include "frc/Solenoid.h"
|
||||
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
|
||||
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
|
||||
#include "wpi/hardware/pneumatic/Solenoid.hpp"
|
||||
|
||||
namespace frc {
|
||||
TEST(SolenoidCTRETest, ValidInitialization) {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "frc/DoubleSolenoid.h"
|
||||
#include "frc/PneumaticsControlModule.h"
|
||||
#include "frc/Solenoid.h"
|
||||
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
|
||||
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
|
||||
#include "wpi/hardware/pneumatic/Solenoid.hpp"
|
||||
|
||||
namespace frc {
|
||||
TEST(SolenoidREVTest, ValidInitialization) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// 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 "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// 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/TimedRobot.h" // NOLINT(build/include_order)
|
||||
#include "wpi/opmode/TimedRobot.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/simulation/DriverStationSim.h"
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "wpi/simulation/DriverStationSim.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// 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/Timer.h" // NOLINT(build/include_order)
|
||||
#include "wpi/system/Timer.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// 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/TimesliceRobot.h" // NOLINT(build/include_order)
|
||||
#include "wpi/opmode/TimesliceRobot.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/simulation/DriverStationSim.h"
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "wpi/simulation/DriverStationSim.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <networktables/DoubleTopic.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
#include <networktables/UnitTopic.h>
|
||||
#include <units/length.h>
|
||||
#include "wpi/nt/DoubleTopic.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include "wpi/nt/UnitTopic.hpp"
|
||||
#include "wpi/units/length.hpp"
|
||||
|
||||
class UnitNetworkTablesTest : public ::testing::Test {
|
||||
public:
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// 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/Watchdog.h" // NOLINT(build/include_order)
|
||||
#include "wpi/system/Watchdog.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// 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 "wpi/driverstation/XboxController.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "JoystickTestMacros.h"
|
||||
#include "frc/simulation/XboxControllerSim.h"
|
||||
#include "JoystickTestMacros.hpp"
|
||||
#include "wpi/simulation/XboxControllerSim.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/drive/DifferentialDrive.h"
|
||||
#include "motorcontrol/MockPWMMotorController.h"
|
||||
#include "wpi/drive/DifferentialDrive.hpp"
|
||||
#include "motorcontrol/MockPWMMotorController.hpp"
|
||||
|
||||
TEST(DifferentialDriveTest, ArcadeDriveIK) {
|
||||
// Forward
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/drive/MecanumDrive.h"
|
||||
#include "motorcontrol/MockPWMMotorController.h"
|
||||
#include "wpi/drive/MecanumDrive.hpp"
|
||||
#include "motorcontrol/MockPWMMotorController.hpp"
|
||||
|
||||
TEST(MecanumDriveTest, CartesianIK) {
|
||||
// Forward
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/event/BooleanEvent.h"
|
||||
#include "frc/event/EventLoop.h"
|
||||
#include "wpi/event/BooleanEvent.hpp"
|
||||
#include "wpi/event/EventLoop.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/Errors.h"
|
||||
#include "frc/event/EventLoop.h"
|
||||
#include "wpi/system/Errors.hpp"
|
||||
#include "wpi/event/EventLoop.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <networktables/BooleanTopic.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
#include "wpi/nt/BooleanTopic.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
|
||||
#include "frc/event/EventLoop.h"
|
||||
#include "frc/event/NetworkBooleanEvent.h"
|
||||
#include "wpi/event/EventLoop.hpp"
|
||||
#include "wpi/event/NetworkBooleanEvent.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HALBase.h>
|
||||
#include "wpi/hal/HALBase.h"
|
||||
|
||||
#ifndef __FRC_SYSTEMCORE__
|
||||
namespace frc::impl {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// 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 "motorcontrol/MockMotorController.h"
|
||||
#include "motorcontrol/MockMotorController.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// 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 "motorcontrol/MockPWMMotorController.h"
|
||||
#include "motorcontrol/MockPWMMotorController.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// 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/motorcontrol/MotorControllerGroup.h" // NOLINT(build/include_order)
|
||||
#include "wpi/hardware/motor/MotorControllerGroup.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <wpi/deprecated.h>
|
||||
#include "wpi/util/deprecated.hpp"
|
||||
|
||||
#include "motorcontrol/MockMotorController.h"
|
||||
#include "motorcontrol/MockMotorController.hpp"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// 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/simulation/AddressableLEDSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/AddressableLEDSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/AddressableLED.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/led/AddressableLED.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
#include <numbers>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include <units/math.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/units/math.hpp"
|
||||
|
||||
#include "frc/AnalogEncoder.h"
|
||||
#include "frc/AnalogInput.h"
|
||||
#include "frc/simulation/AnalogEncoderSim.h"
|
||||
#include "wpi/hardware/rotation/AnalogEncoder.hpp"
|
||||
#include "wpi/hardware/discrete/AnalogInput.hpp"
|
||||
#include "wpi/simulation/AnalogEncoderSim.hpp"
|
||||
|
||||
#define EXPECT_NEAR_UNITS(val1, val2, eps) \
|
||||
EXPECT_LE(units::math::abs(val1 - val2), eps)
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// 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/simulation/AnalogInputSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/AnalogInputSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/AnalogInput.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/discrete/AnalogInput.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// 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/simulation/CTREPCMSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/CTREPCMSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/DoubleSolenoid.h"
|
||||
#include "frc/PneumaticsControlModule.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
|
||||
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/Encoder.h"
|
||||
#include "frc/RobotController.h"
|
||||
#include "frc/controller/PIDController.h"
|
||||
#include "frc/motorcontrol/PWMVictorSPX.h"
|
||||
#include "frc/simulation/BatterySim.h"
|
||||
#include "frc/simulation/DCMotorSim.h"
|
||||
#include "frc/simulation/EncoderSim.h"
|
||||
#include "frc/simulation/RoboRioSim.h"
|
||||
#include "frc/system/plant/LinearSystemId.h"
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
#include "wpi/math/controller/PIDController.hpp"
|
||||
#include "wpi/hardware/motor/PWMVictorSPX.hpp"
|
||||
#include "wpi/simulation/BatterySim.hpp"
|
||||
#include "wpi/simulation/DCMotorSim.hpp"
|
||||
#include "wpi/simulation/EncoderSim.hpp"
|
||||
#include "wpi/simulation/RoboRioSim.hpp"
|
||||
#include "wpi/math/system/plant/LinearSystemId.hpp"
|
||||
|
||||
TEST(DCMotorSimTest, VoltageSteadyState) {
|
||||
frc::DCMotor gearbox = frc::DCMotor::NEO(1);
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// 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/simulation/DIOSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/DIOSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/DigitalInput.h"
|
||||
#include "frc/DigitalOutput.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/discrete/DigitalInput.hpp"
|
||||
#include "wpi/hardware/discrete/DigitalOutput.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <units/current.h>
|
||||
#include <units/math.h>
|
||||
#include <units/moment_of_inertia.h>
|
||||
#include "wpi/units/current.hpp"
|
||||
#include "wpi/units/math.hpp"
|
||||
#include "wpi/units/moment_of_inertia.hpp"
|
||||
|
||||
#include "frc/controller/LTVUnicycleController.h"
|
||||
#include "frc/controller/LinearPlantInversionFeedforward.h"
|
||||
#include "frc/kinematics/DifferentialDriveKinematics.h"
|
||||
#include "frc/simulation/DifferentialDrivetrainSim.h"
|
||||
#include "frc/system/NumericalIntegration.h"
|
||||
#include "frc/system/plant/DCMotor.h"
|
||||
#include "frc/system/plant/LinearSystemId.h"
|
||||
#include "frc/trajectory/TrajectoryGenerator.h"
|
||||
#include "frc/trajectory/constraint/DifferentialDriveKinematicsConstraint.h"
|
||||
#include "wpi/math/controller/LTVUnicycleController.hpp"
|
||||
#include "wpi/math/controller/LinearPlantInversionFeedforward.hpp"
|
||||
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
|
||||
#include "wpi/simulation/DifferentialDrivetrainSim.hpp"
|
||||
#include "wpi/math/system/NumericalIntegration.hpp"
|
||||
#include "wpi/math/system/plant/DCMotor.hpp"
|
||||
#include "wpi/math/system/plant/LinearSystemId.hpp"
|
||||
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"
|
||||
#include "wpi/math/trajectory/constraint/DifferentialDriveKinematicsConstraint.hpp"
|
||||
|
||||
TEST(DifferentialDrivetrainSimTest, Convergence) {
|
||||
auto motor = frc::DCMotor::NEO(2);
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// 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/simulation/DigitalPWMSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/DigitalPWMSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/DigitalOutput.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/discrete/DigitalOutput.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/DriverStation.h"
|
||||
#include "frc/Joystick.h"
|
||||
#include "frc/RobotState.h"
|
||||
#include "frc/simulation/DriverStationSim.h"
|
||||
#include "frc/simulation/SimHooks.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/RobotState.hpp"
|
||||
#include "wpi/simulation/DriverStationSim.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
using namespace frc;
|
||||
using namespace frc::sim;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// 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/simulation/DutyCycleEncoderSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/DutyCycleEncoderSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/DutyCycleEncoder.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/rotation/DutyCycleEncoder.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// 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/simulation/DutyCycleSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/DutyCycleSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/DigitalInput.h"
|
||||
#include "frc/DutyCycle.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/discrete/DigitalInput.hpp"
|
||||
#include "wpi/hardware/rotation/DutyCycle.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <units/math.h>
|
||||
#include <units/time.h>
|
||||
#include "wpi/units/math.hpp"
|
||||
#include "wpi/units/time.hpp"
|
||||
|
||||
#include "frc/Encoder.h"
|
||||
#include "frc/RobotController.h"
|
||||
#include "frc/controller/PIDController.h"
|
||||
#include "frc/motorcontrol/PWMVictorSPX.h"
|
||||
#include "frc/simulation/ElevatorSim.h"
|
||||
#include "frc/simulation/EncoderSim.h"
|
||||
#include "frc/system/NumericalIntegration.h"
|
||||
#include "frc/system/plant/DCMotor.h"
|
||||
#include "frc/system/plant/LinearSystemId.h"
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
#include "wpi/math/controller/PIDController.hpp"
|
||||
#include "wpi/hardware/motor/PWMVictorSPX.hpp"
|
||||
#include "wpi/simulation/ElevatorSim.hpp"
|
||||
#include "wpi/simulation/EncoderSim.hpp"
|
||||
#include "wpi/math/system/NumericalIntegration.hpp"
|
||||
#include "wpi/math/system/plant/DCMotor.hpp"
|
||||
#include "wpi/math/system/plant/LinearSystemId.hpp"
|
||||
|
||||
#define EXPECT_NEAR_UNITS(val1, val2, eps) \
|
||||
EXPECT_LE(units::math::abs(val1 - val2), eps)
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// 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/simulation/EncoderSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/EncoderSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include <wpi/deprecated.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/util/deprecated.hpp"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/Encoder.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// 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/simulation/PowerDistributionSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/PowerDistributionSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/PowerDistribution.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/power/PowerDistribution.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// 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/simulation/PWMMotorControllerSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/PWMMotorControllerSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "frc/motorcontrol/Spark.h"
|
||||
#include "wpi/hardware/motor/Spark.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
TEST(PWMMotorControllerSimTest, TestMotor) {
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// 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/simulation/PWMSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/PWMSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/PWM.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/discrete/PWM.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// 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/simulation/REVPHSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/REVPHSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/DoubleSolenoid.h"
|
||||
#include "frc/PneumaticHub.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
|
||||
#include "wpi/hardware/pneumatic/PneumaticHub.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
// 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/simulation/RoboRioSim.h" // NOLINT(build/include_order)
|
||||
#include "wpi/simulation/RoboRioSim.hpp" // NOLINT(build/include_order)
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include <hal/HALBase.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
|
||||
#include "callback_helpers/TestCallbackHelpers.h"
|
||||
#include "frc/RobotController.h"
|
||||
#include "callback_helpers/TestCallbackHelpers.hpp"
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include <string_view>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/SimDevice.h>
|
||||
#include "wpi/hal/SimDevice.h"
|
||||
|
||||
#include "frc/simulation/SimDeviceSim.h"
|
||||
#include "wpi/simulation/SimDeviceSim.hpp"
|
||||
|
||||
using namespace frc::sim;
|
||||
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
#include <exception>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include "frc/simulation/AddressableLEDSim.h"
|
||||
#include "frc/simulation/AnalogInputSim.h"
|
||||
#include "frc/simulation/CTREPCMSim.h"
|
||||
#include "frc/simulation/DIOSim.h"
|
||||
#include "frc/simulation/DigitalPWMSim.h"
|
||||
#include "frc/simulation/DriverStationSim.h"
|
||||
#include "frc/simulation/DutyCycleSim.h"
|
||||
#include "frc/simulation/EncoderSim.h"
|
||||
#include "frc/simulation/PWMSim.h"
|
||||
#include "frc/simulation/PowerDistributionSim.h"
|
||||
#include "frc/simulation/RoboRioSim.h"
|
||||
#include "wpi/simulation/AddressableLEDSim.hpp"
|
||||
#include "wpi/simulation/AnalogInputSim.hpp"
|
||||
#include "wpi/simulation/CTREPCMSim.hpp"
|
||||
#include "wpi/simulation/DIOSim.hpp"
|
||||
#include "wpi/simulation/DigitalPWMSim.hpp"
|
||||
#include "wpi/simulation/DriverStationSim.hpp"
|
||||
#include "wpi/simulation/DutyCycleSim.hpp"
|
||||
#include "wpi/simulation/EncoderSim.hpp"
|
||||
#include "wpi/simulation/PWMSim.hpp"
|
||||
#include "wpi/simulation/PowerDistributionSim.hpp"
|
||||
#include "wpi/simulation/RoboRioSim.hpp"
|
||||
|
||||
using namespace frc::sim;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/simulation/SingleJointedArmSim.h"
|
||||
#include "wpi/simulation/SingleJointedArmSim.hpp"
|
||||
|
||||
TEST(SingleJointedArmTest, Disabled) {
|
||||
frc::sim::SingleJointedArmSim sim(frc::DCMotor::Vex775Pro(2), 300, 3_kg_sq_m,
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <units/angular_acceleration.h>
|
||||
#include <units/angular_velocity.h>
|
||||
#include "wpi/units/angular_acceleration.hpp"
|
||||
#include "wpi/units/angular_velocity.hpp"
|
||||
|
||||
#include "frc/Encoder.h"
|
||||
#include "frc/RobotController.h"
|
||||
#include "frc/controller/PIDController.h"
|
||||
#include "frc/controller/SimpleMotorFeedforward.h"
|
||||
#include "frc/motorcontrol/PWMVictorSPX.h"
|
||||
#include "frc/simulation/BatterySim.h"
|
||||
#include "frc/simulation/DifferentialDrivetrainSim.h"
|
||||
#include "frc/simulation/ElevatorSim.h"
|
||||
#include "frc/simulation/EncoderSim.h"
|
||||
#include "frc/simulation/FlywheelSim.h"
|
||||
#include "frc/simulation/LinearSystemSim.h"
|
||||
#include "frc/simulation/PWMSim.h"
|
||||
#include "frc/simulation/RoboRioSim.h"
|
||||
#include "frc/system/plant/LinearSystemId.h"
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
#include "wpi/math/controller/PIDController.hpp"
|
||||
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
|
||||
#include "wpi/hardware/motor/PWMVictorSPX.hpp"
|
||||
#include "wpi/simulation/BatterySim.hpp"
|
||||
#include "wpi/simulation/DifferentialDrivetrainSim.hpp"
|
||||
#include "wpi/simulation/ElevatorSim.hpp"
|
||||
#include "wpi/simulation/EncoderSim.hpp"
|
||||
#include "wpi/simulation/FlywheelSim.hpp"
|
||||
#include "wpi/simulation/LinearSystemSim.hpp"
|
||||
#include "wpi/simulation/PWMSim.hpp"
|
||||
#include "wpi/simulation/RoboRioSim.hpp"
|
||||
#include "wpi/math/system/plant/LinearSystemId.hpp"
|
||||
|
||||
TEST(StateSpaceSimTest, FlywheelSim) {
|
||||
const frc::LinearSystem<1, 1, 1> plant =
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// 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/smartdashboard/Mechanism2d.h>
|
||||
#include <frc/smartdashboard/MechanismLigament2d.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <frc/util/Color8Bit.h>
|
||||
#include "wpi/smartdashboard/Mechanism2d.hpp"
|
||||
#include "wpi/smartdashboard/MechanismLigament2d.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
#include "wpi/util/Color8Bit.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
#include <units/angle.h>
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include "wpi/units/angle.hpp"
|
||||
|
||||
class Mechanism2dTest;
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
// 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/simulation/SendableChooserSim.h>
|
||||
#include <frc/smartdashboard/SendableChooser.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/simulation/SendableChooserSim.hpp"
|
||||
#include "wpi/smartdashboard/SendableChooser.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
#include <networktables/StringTopic.h>
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include "wpi/nt/StringTopic.hpp"
|
||||
|
||||
class SendableChooserTest : public ::testing::TestWithParam<int> {};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/util/Color8Bit.h"
|
||||
#include "wpi/util/Color8Bit.hpp"
|
||||
|
||||
TEST(Color8BitTest, ConstructDefault) {
|
||||
constexpr frc::Color8Bit color;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "frc/util/Color.h"
|
||||
#include "wpi/util/Color.hpp"
|
||||
|
||||
TEST(ColorTest, ConstructDefault) {
|
||||
constexpr frc::Color color;
|
||||
|
||||
Reference in New Issue
Block a user