[cscore, wpilibcExamples] Use double-quote includes for wpi/ (#8346)

Use ERR and WARN in cscore to avoid conflict with Windows headers.
This commit is contained in:
Peter Johnson
2025-11-08 16:58:51 -08:00
committed by GitHub
parent fc4e922206
commit 5c9c45fadb
226 changed files with 868 additions and 951 deletions

View File

@@ -4,8 +4,8 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/CommandHelper.hpp>
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/CommandHelper.hpp"
/**
* An example command.

View File

@@ -4,8 +4,8 @@
#pragma once
#include <wpi/commands2/CommandHelper.hpp>
#include <wpi/commands2/InstantCommand.hpp>
#include "wpi/commands2/CommandHelper.hpp"
#include "wpi/commands2/InstantCommand.hpp"
// NOTE: Consider using this command inline, rather than writing a subclass.
// For more information, see:

View File

@@ -4,8 +4,8 @@
#pragma once
#include <wpi/commands2/CommandHelper.hpp>
#include <wpi/commands2/ParallelCommandGroup.hpp>
#include "wpi/commands2/CommandHelper.hpp"
#include "wpi/commands2/ParallelCommandGroup.hpp"
// NOTE: Consider using this command inline, rather than writing a subclass.
// For more information, see:

View File

@@ -4,7 +4,7 @@
#include "ReplaceMeParallelDeadlineGroup.hpp"
#include <wpi/commands2/InstantCommand.hpp>
#include "wpi/commands2/InstantCommand.hpp"
// NOTE: Consider using this command inline, rather than writing a subclass.
// For more information, see:

View File

@@ -4,8 +4,8 @@
#pragma once
#include <wpi/commands2/CommandHelper.hpp>
#include <wpi/commands2/ParallelDeadlineGroup.hpp>
#include "wpi/commands2/CommandHelper.hpp"
#include "wpi/commands2/ParallelDeadlineGroup.hpp"
// NOTE: Consider using this command inline, rather than writing a subclass.
// For more information, see:

View File

@@ -4,8 +4,8 @@
#pragma once
#include <wpi/commands2/CommandHelper.hpp>
#include <wpi/commands2/ParallelRaceGroup.hpp>
#include "wpi/commands2/CommandHelper.hpp"
#include "wpi/commands2/ParallelRaceGroup.hpp"
// NOTE: Consider using this command inline, rather than writing a subclass.
// For more information, see:

View File

@@ -4,8 +4,8 @@
#pragma once
#include <wpi/commands2/CommandHelper.hpp>
#include <wpi/commands2/SequentialCommandGroup.hpp>
#include "wpi/commands2/CommandHelper.hpp"
#include "wpi/commands2/SequentialCommandGroup.hpp"
// NOTE: Consider using this command inline, rather than writing a subclass.
// For more information, see:

View File

@@ -4,7 +4,7 @@
#pragma once
#include <wpi/commands2/SubsystemBase.hpp>
#include "wpi/commands2/SubsystemBase.hpp"
class ReplaceMeSubsystem2 : public wpi::cmd::SubsystemBase {
public:

View File

@@ -6,9 +6,9 @@
#include <array>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/led/AddressableLED.hpp>
#include <wpi/hardware/led/LEDPattern.hpp>
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/led/AddressableLED.hpp"
#include "wpi/hardware/led/LEDPattern.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -12,16 +12,17 @@
#include <opencv2/core/core.hpp>
#include <opencv2/core/types.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <wpi/apriltag/AprilTagDetection.hpp>
#include <wpi/apriltag/AprilTagDetector.hpp>
#include <wpi/apriltag/AprilTagPoseEstimator.hpp>
#include <wpi/cameraserver/CameraServer.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/math/geometry/Transform3d.hpp>
#include <wpi/nt/IntegerArrayTopic.hpp>
#include <wpi/nt/NetworkTableInstance.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/units/length.hpp>
#include "wpi/apriltag/AprilTagDetection.hpp"
#include "wpi/apriltag/AprilTagDetector.hpp"
#include "wpi/apriltag/AprilTagPoseEstimator.hpp"
#include "wpi/cameraserver/CameraServer.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/math/geometry/Transform3d.hpp"
#include "wpi/nt/IntegerArrayTopic.hpp"
#include "wpi/nt/NetworkTableInstance.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/length.hpp"
/**
* This is a demo program showing the detection of AprilTags.

View File

@@ -2,10 +2,10 @@
// 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 <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include "wpi/drive/DifferentialDrive.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
/**
* This is a demo program showing the use of the DifferentialDrive class.

View File

@@ -2,10 +2,10 @@
// 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 <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include "wpi/drive/DifferentialDrive.hpp"
#include "wpi/driverstation/XboxController.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
/**
* This is a demo program showing the use of the DifferentialDrive class.

View File

@@ -4,10 +4,10 @@
#include "subsystems/Arm.hpp"
#include <wpi/math/util/StateSpaceUtil.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/system/RobotController.hpp>
#include <wpi/util/Preferences.hpp>
#include "wpi/math/util/StateSpaceUtil.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
#include "wpi/system/RobotController.hpp"
#include "wpi/util/Preferences.hpp"
Arm::Arm() {
m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse);

View File

@@ -6,12 +6,12 @@
#include <numbers>
#include <wpi/units/angle.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/mass.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/velocity.hpp>
#include <wpi/units/voltage.hpp>
#include "wpi/units/angle.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/mass.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/velocity.hpp"
#include "wpi/units/voltage.hpp"
/**
* The Constants header provides a convenient place for teams to hold robot-wide

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "subsystems/Arm.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
/**
* This is a sample program to demonstrate the use of arm simulation.

View File

@@ -4,21 +4,20 @@
#pragma once
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/ArmFeedforward.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/simulation/BatterySim.hpp>
#include <wpi/simulation/EncoderSim.hpp>
#include <wpi/simulation/PWMSim.hpp>
#include <wpi/simulation/RoboRioSim.hpp>
#include <wpi/simulation/SingleJointedArmSim.hpp>
#include <wpi/smartdashboard/Mechanism2d.hpp>
#include <wpi/smartdashboard/MechanismLigament2d.hpp>
#include <wpi/smartdashboard/MechanismRoot2d.hpp>
#include <wpi/units/length.hpp>
#include "Constants.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/ArmFeedforward.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/simulation/BatterySim.hpp"
#include "wpi/simulation/EncoderSim.hpp"
#include "wpi/simulation/PWMSim.hpp"
#include "wpi/simulation/RoboRioSim.hpp"
#include "wpi/simulation/SingleJointedArmSim.hpp"
#include "wpi/smartdashboard/Mechanism2d.hpp"
#include "wpi/smartdashboard/MechanismLigament2d.hpp"
#include "wpi/smartdashboard/MechanismRoot2d.hpp"
#include "wpi/units/length.hpp"
class Arm {
public:

View File

@@ -2,9 +2,9 @@
// 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 <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/power/PowerDistribution.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/power/PowerDistribution.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
/**
* This is a sample program showing how to retrieve information from the Power

View File

@@ -2,11 +2,10 @@
// 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 <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/math/filter/SlewRateLimiter.hpp>
#include "Drivetrain.hpp"
#include "wpi/driverstation/XboxController.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/math/filter/SlewRateLimiter.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -6,17 +6,17 @@
#include <numbers>
#include <wpi/hardware/imu/OnboardIMU.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/math/kinematics/DifferentialDriveKinematics.hpp>
#include <wpi/math/kinematics/DifferentialDriveOdometry.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/units/angular_velocity.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/velocity.hpp>
#include "wpi/hardware/imu/OnboardIMU.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include "wpi/math/kinematics/DifferentialDriveOdometry.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/angular_velocity.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/velocity.hpp"
/**
* Represents a differential drive style drivetrain.

View File

@@ -2,11 +2,10 @@
// 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 <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/math/filter/SlewRateLimiter.hpp>
#include "Drivetrain.hpp"
#include "wpi/driverstation/XboxController.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/math/filter/SlewRateLimiter.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -6,33 +6,33 @@
#include <numbers>
#include <wpi/apriltag/AprilTagFieldLayout.hpp>
#include <wpi/apriltag/AprilTagFields.hpp>
#include <wpi/hardware/imu/OnboardIMU.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/math/estimator/DifferentialDrivePoseEstimator.hpp>
#include <wpi/math/geometry/Pose2d.hpp>
#include <wpi/math/geometry/Pose3d.hpp>
#include <wpi/math/geometry/Quaternion.hpp>
#include <wpi/math/geometry/Transform3d.hpp>
#include <wpi/math/kinematics/DifferentialDriveKinematics.hpp>
#include <wpi/math/system/plant/LinearSystemId.hpp>
#include <wpi/math/util/ComputerVisionUtil.hpp>
#include <wpi/nt/DoubleArrayTopic.hpp>
#include <wpi/nt/NetworkTableInstance.hpp>
#include <wpi/simulation/DifferentialDrivetrainSim.hpp>
#include <wpi/simulation/EncoderSim.hpp>
#include <wpi/smartdashboard/Field2d.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/system/RobotController.hpp>
#include <wpi/system/Timer.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/units/angular_velocity.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/velocity.hpp>
#include "wpi/apriltag/AprilTagFieldLayout.hpp"
#include "wpi/apriltag/AprilTagFields.hpp"
#include "wpi/hardware/imu/OnboardIMU.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/math/estimator/DifferentialDrivePoseEstimator.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/geometry/Quaternion.hpp"
#include "wpi/math/geometry/Transform3d.hpp"
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include "wpi/math/system/plant/LinearSystemId.hpp"
#include "wpi/math/util/ComputerVisionUtil.hpp"
#include "wpi/nt/DoubleArrayTopic.hpp"
#include "wpi/nt/NetworkTableInstance.hpp"
#include "wpi/simulation/DifferentialDrivetrainSim.hpp"
#include "wpi/simulation/EncoderSim.hpp"
#include "wpi/smartdashboard/Field2d.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
#include "wpi/system/RobotController.hpp"
#include "wpi/system/Timer.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/angular_velocity.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/velocity.hpp"
/**
* Represents a differential drive style drivetrain.

View File

@@ -4,8 +4,8 @@
#pragma once
#include <wpi/math/geometry/Pose2d.hpp>
#include <wpi/math/util/StateSpaceUtil.hpp>
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/util/StateSpaceUtil.hpp"
/**
* This dummy class represents a global measurement sensor, such as a computer

View File

@@ -4,7 +4,7 @@
#include "Robot.hpp"
#include <wpi/driverstation/DriverStation.hpp>
#include "wpi/driverstation/DriverStation.hpp"
void Robot::RobotPeriodic() {
// pull alliance port high if on red alliance, pull low if on blue alliance

View File

@@ -6,8 +6,8 @@
#include <array>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/discrete/DigitalOutput.hpp>
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/discrete/DigitalOutput.hpp"
/**
* This is a sample program demonstrating how to communicate to a light

View File

@@ -4,8 +4,8 @@
#include "Robot.hpp"
#include <wpi/commands2/CommandScheduler.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include "wpi/commands2/CommandScheduler.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
Robot::Robot() {}

View File

@@ -4,7 +4,7 @@
#include "RobotContainer.hpp"
#include <wpi/commands2/Commands.hpp>
#include "wpi/commands2/Commands.hpp"
RobotContainer::RobotContainer() {
// Initialize all of your commands and subsystems here

View File

@@ -4,7 +4,7 @@
#include "subsystems/DriveSubsystem.hpp"
#include <wpi/system/RobotController.hpp>
#include "wpi/system/RobotController.hpp"
using namespace DriveConstants;

View File

@@ -6,11 +6,11 @@
#include <numbers>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/velocity.hpp>
#include <wpi/units/voltage.hpp>
#include "wpi/units/acceleration.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/velocity.hpp"
#include "wpi/units/voltage.hpp"
/**
* The Constants header provides a convenient place for teams to hold robot-wide

View File

@@ -6,10 +6,9 @@
#include <optional>
#include <wpi/commands2/Command.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/framework/TimedRobot.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -4,13 +4,12 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/commands2/Commands.hpp>
#include <wpi/commands2/button/CommandXboxController.hpp>
#include "Constants.hpp"
#include "subsystems/DriveSubsystem.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/commands2/Commands.hpp"
#include "wpi/commands2/button/CommandXboxController.hpp"
/**
* This class is where the bulk of the robot should be declared. Since

View File

@@ -4,17 +4,16 @@
#pragma once
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/commands2/SubsystemBase.hpp>
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/math/trajectory/TrapezoidProfile.hpp>
#include <wpi/system/Timer.hpp>
#include <wpi/units/length.hpp>
#include "Constants.hpp"
#include "ExampleSmartMotorController.hpp"
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/commands2/SubsystemBase.hpp"
#include "wpi/drive/DifferentialDrive.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/math/trajectory/TrapezoidProfile.hpp"
#include "wpi/system/Timer.hpp"
#include "wpi/units/length.hpp"
class DriveSubsystem : public wpi::cmd::SubsystemBase {
public:

View File

@@ -2,10 +2,10 @@
// 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 <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/rotation/DutyCycleEncoder.hpp>
#include <wpi/math/util/MathUtil.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/rotation/DutyCycleEncoder.hpp"
#include "wpi/math/util/MathUtil.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
constexpr double fullRange = 1.3;
constexpr double expectedZero = 0.0;

View File

@@ -2,10 +2,10 @@
// 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 <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/discrete/DigitalInput.hpp>
#include <wpi/hardware/rotation/DutyCycle.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/discrete/DigitalInput.hpp"
#include "wpi/hardware/rotation/DutyCycle.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
class Robot : public wpi::TimedRobot {
wpi::DutyCycle m_dutyCycle{0}; // Duty cycle input

View File

@@ -4,17 +4,16 @@
#include <numbers>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/math/trajectory/ExponentialProfile.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/velocity.hpp>
#include <wpi/units/voltage.hpp>
#include "ExampleSmartMotorController.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/math/trajectory/ExponentialProfile.hpp"
#include "wpi/units/acceleration.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/velocity.hpp"
#include "wpi/units/voltage.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -4,9 +4,9 @@
#include "subsystems/Elevator.hpp"
#include <wpi/math/util/StateSpaceUtil.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/system/RobotController.hpp>
#include "wpi/math/util/StateSpaceUtil.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
#include "wpi/system/RobotController.hpp"
Elevator::Elevator() {
m_encoder.SetDistancePerPulse(Constants::kArmEncoderDistPerPulse);

View File

@@ -6,13 +6,13 @@
#include <numbers>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/mass.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/velocity.hpp>
#include <wpi/units/voltage.hpp>
#include "wpi/units/acceleration.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/mass.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/velocity.hpp"
#include "wpi/units/voltage.hpp"
/**
* The Constants header provides a convenient place for teams to hold robot-wide

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "subsystems/Elevator.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
/**
* This is a sample program to demonstrate the use of elevator simulation.

View File

@@ -4,22 +4,21 @@
#pragma once
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/ElevatorFeedforward.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/math/trajectory/ExponentialProfile.hpp>
#include <wpi/simulation/BatterySim.hpp>
#include <wpi/simulation/ElevatorSim.hpp>
#include <wpi/simulation/EncoderSim.hpp>
#include <wpi/simulation/PWMMotorControllerSim.hpp>
#include <wpi/simulation/RoboRioSim.hpp>
#include <wpi/smartdashboard/Mechanism2d.hpp>
#include <wpi/smartdashboard/MechanismLigament2d.hpp>
#include <wpi/smartdashboard/MechanismRoot2d.hpp>
#include <wpi/units/length.hpp>
#include "Constants.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/ElevatorFeedforward.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/math/trajectory/ExponentialProfile.hpp"
#include "wpi/simulation/BatterySim.hpp"
#include "wpi/simulation/ElevatorSim.hpp"
#include "wpi/simulation/EncoderSim.hpp"
#include "wpi/simulation/PWMMotorControllerSim.hpp"
#include "wpi/simulation/RoboRioSim.hpp"
#include "wpi/smartdashboard/Mechanism2d.hpp"
#include "wpi/smartdashboard/MechanismLigament2d.hpp"
#include "wpi/smartdashboard/MechanismRoot2d.hpp"
#include "wpi/units/length.hpp"
class Elevator {
public:

View File

@@ -4,18 +4,18 @@
#include <numbers>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/ElevatorFeedforward.hpp>
#include <wpi/math/controller/ProfiledPIDController.hpp>
#include <wpi/math/trajectory/TrapezoidProfile.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/velocity.hpp>
#include <wpi/units/voltage.hpp>
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/ElevatorFeedforward.hpp"
#include "wpi/math/controller/ProfiledPIDController.hpp"
#include "wpi/math/trajectory/TrapezoidProfile.hpp"
#include "wpi/units/acceleration.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/velocity.hpp"
#include "wpi/units/voltage.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -4,9 +4,9 @@
#include "subsystems/Elevator.hpp"
#include <wpi/math/util/StateSpaceUtil.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/system/RobotController.hpp>
#include "wpi/math/util/StateSpaceUtil.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
#include "wpi/system/RobotController.hpp"
Elevator::Elevator() {
m_encoder.SetDistancePerPulse(Constants::kArmEncoderDistPerPulse);

View File

@@ -6,13 +6,13 @@
#include <numbers>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/mass.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/velocity.hpp>
#include <wpi/units/voltage.hpp>
#include "wpi/units/acceleration.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/mass.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/velocity.hpp"
#include "wpi/units/voltage.hpp"
/**
* The Constants header provides a convenient place for teams to hold robot-wide

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "subsystems/Elevator.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
/**
* This is a sample program to demonstrate the use of elevator simulation.

View File

@@ -4,22 +4,21 @@
#pragma once
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/ElevatorFeedforward.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/math/controller/ProfiledPIDController.hpp>
#include <wpi/simulation/BatterySim.hpp>
#include <wpi/simulation/ElevatorSim.hpp>
#include <wpi/simulation/EncoderSim.hpp>
#include <wpi/simulation/PWMMotorControllerSim.hpp>
#include <wpi/simulation/RoboRioSim.hpp>
#include <wpi/smartdashboard/Mechanism2d.hpp>
#include <wpi/smartdashboard/MechanismLigament2d.hpp>
#include <wpi/smartdashboard/MechanismRoot2d.hpp>
#include <wpi/units/length.hpp>
#include "Constants.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/ElevatorFeedforward.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/math/controller/ProfiledPIDController.hpp"
#include "wpi/simulation/BatterySim.hpp"
#include "wpi/simulation/ElevatorSim.hpp"
#include "wpi/simulation/EncoderSim.hpp"
#include "wpi/simulation/PWMMotorControllerSim.hpp"
#include "wpi/simulation/RoboRioSim.hpp"
#include "wpi/smartdashboard/Mechanism2d.hpp"
#include "wpi/smartdashboard/MechanismLigament2d.hpp"
#include "wpi/smartdashboard/MechanismRoot2d.hpp"
#include "wpi/units/length.hpp"
class Elevator {
public:

View File

@@ -4,17 +4,16 @@
#include <numbers>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/math/trajectory/TrapezoidProfile.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/velocity.hpp>
#include <wpi/units/voltage.hpp>
#include "ExampleSmartMotorController.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/math/trajectory/TrapezoidProfile.hpp"
#include "wpi/units/acceleration.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/velocity.hpp"
#include "wpi/units/voltage.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -4,9 +4,9 @@
#include <numbers>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
/**
* Sample program displaying the value of a quadrature encoder on the

View File

@@ -2,18 +2,18 @@
// 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 <wpi/driverstation/Joystick.hpp>
#include <wpi/event/BooleanEvent.hpp>
#include <wpi/event/EventLoop.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/units/angular_velocity.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/voltage.hpp>
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/event/BooleanEvent.hpp"
#include "wpi/event/EventLoop.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/units/angular_velocity.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/voltage.hpp"
static const auto SHOT_VELOCITY = 200_rpm;
static const auto TOLERANCE = 8_rpm;

View File

@@ -2,17 +2,17 @@
// 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 <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/BangBangController.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/math/system/plant/LinearSystemId.hpp>
#include <wpi/simulation/EncoderSim.hpp>
#include <wpi/simulation/FlywheelSim.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/units/moment_of_inertia.hpp>
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/BangBangController.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/math/system/plant/LinearSystemId.hpp"
#include "wpi/simulation/EncoderSim.hpp"
#include "wpi/simulation/FlywheelSim.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
#include "wpi/units/moment_of_inertia.hpp"
/**
* This is a sample program to demonstrate the use of a

View File

@@ -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 <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/system/Timer.hpp>
#include "wpi/drive/DifferentialDrive.hpp"
#include "wpi/driverstation/XboxController.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/system/Timer.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -4,11 +4,11 @@
#include <cmath>
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/imu/OnboardIMU.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include "wpi/drive/DifferentialDrive.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/imu/OnboardIMU.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
/**
* This is a sample program to demonstrate how to use a gyro sensor to make a

View File

@@ -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 <wpi/drive/MecanumDrive.hpp>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/imu/OnboardIMU.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include "wpi/drive/MecanumDrive.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/imu/OnboardIMU.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
/**
* This is a sample program that uses mecanum drive with a gyro sensor to

View File

@@ -15,7 +15,7 @@ that want even more control over what code runs on their robot.
#include <stdio.h>
#include <wpi/hal/HAL.h>
#include "wpi/hal/HAL.h"
enum DriverStationMode {
DisabledMode,

View File

@@ -4,10 +4,10 @@
#include "Robot.hpp"
#include <wpi/commands2/CommandScheduler.hpp>
#include <wpi/driverstation/DriverStation.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/system/DataLogManager.hpp>
#include "wpi/commands2/CommandScheduler.hpp"
#include "wpi/driverstation/DriverStation.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
#include "wpi/system/DataLogManager.hpp"
Robot::Robot() {
// Start recording to data log

View File

@@ -4,7 +4,7 @@
#include "RobotContainer.hpp"
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include "wpi/smartdashboard/SmartDashboard.hpp"
RobotContainer::RobotContainer() {
// Initialize all of your commands and subsystems here

View File

@@ -4,10 +4,9 @@
#include "commands/Autos.hpp"
#include <wpi/commands2/Commands.hpp>
#include <wpi/commands2/FunctionalCommand.hpp>
#include "Constants.hpp"
#include "wpi/commands2/Commands.hpp"
#include "wpi/commands2/FunctionalCommand.hpp"
using namespace AutoConstants;

View File

@@ -4,7 +4,7 @@
#include "subsystems/DriveSubsystem.hpp"
#include <wpi/util/sendable/SendableBuilder.hpp>
#include "wpi/util/sendable/SendableBuilder.hpp"
using namespace DriveConstants;

View File

@@ -4,7 +4,7 @@
#include "subsystems/HatchSubsystem.hpp"
#include <wpi/util/sendable/SendableBuilder.hpp>
#include "wpi/util/sendable/SendableBuilder.hpp"
using namespace HatchConstants;

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/framework/TimedRobot.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -4,15 +4,14 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/Commands.hpp>
#include <wpi/commands2/button/CommandPS4Controller.hpp>
#include <wpi/smartdashboard/SendableChooser.hpp>
#include "Constants.hpp"
#include "commands/Autos.hpp"
#include "subsystems/DriveSubsystem.hpp"
#include "subsystems/HatchSubsystem.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/Commands.hpp"
#include "wpi/commands2/button/CommandPS4Controller.hpp"
#include "wpi/smartdashboard/SendableChooser.hpp"
namespace ac = AutoConstants;

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/commands2/CommandPtr.hpp>
#include "subsystems/DriveSubsystem.hpp"
#include "subsystems/HatchSubsystem.hpp"
#include "wpi/commands2/CommandPtr.hpp"
/** Container for auto command factories. */
namespace autos {

View File

@@ -4,12 +4,11 @@
#pragma once
#include <wpi/commands2/SubsystemBase.hpp>
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include "Constants.hpp"
#include "wpi/commands2/SubsystemBase.hpp"
#include "wpi/drive/DifferentialDrive.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
class DriveSubsystem : public wpi::cmd::SubsystemBase {
public:

View File

@@ -4,12 +4,11 @@
#pragma once
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/commands2/SubsystemBase.hpp>
#include <wpi/hardware/pneumatic/DoubleSolenoid.hpp>
#include <wpi/hardware/pneumatic/PneumaticsControlModule.hpp>
#include "Constants.hpp"
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/commands2/SubsystemBase.hpp"
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
class HatchSubsystem : public wpi::cmd::SubsystemBase {
public:

View File

@@ -4,10 +4,10 @@
#include "Robot.hpp"
#include <wpi/commands2/CommandScheduler.hpp>
#include <wpi/driverstation/DriverStation.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/system/DataLogManager.hpp>
#include "wpi/commands2/CommandScheduler.hpp"
#include "wpi/driverstation/DriverStation.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
#include "wpi/system/DataLogManager.hpp"
Robot::Robot() {
// Start recording to data log

View File

@@ -4,13 +4,12 @@
#include "RobotContainer.hpp"
#include <wpi/commands2/button/JoystickButton.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include "commands/DefaultDrive.hpp"
#include "commands/GrabHatch.hpp"
#include "commands/HalveDriveSpeed.hpp"
#include "commands/ReleaseHatch.hpp"
#include "wpi/commands2/button/JoystickButton.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
RobotContainer::RobotContainer() {
// Initialize all of your commands and subsystems here

View File

@@ -4,7 +4,7 @@
#include "subsystems/DriveSubsystem.hpp"
#include <wpi/util/sendable/SendableBuilder.hpp>
#include "wpi/util/sendable/SendableBuilder.hpp"
using namespace DriveConstants;

View File

@@ -4,7 +4,7 @@
#include "subsystems/HatchSubsystem.hpp"
#include <wpi/util/sendable/SendableBuilder.hpp>
#include "wpi/util/sendable/SendableBuilder.hpp"
using namespace HatchConstants;

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/framework/TimedRobot.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -4,16 +4,15 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/smartdashboard/SendableChooser.hpp>
#include "Constants.hpp"
#include "commands/ComplexAuto.hpp"
#include "commands/DefaultDrive.hpp"
#include "commands/DriveDistance.hpp"
#include "subsystems/DriveSubsystem.hpp"
#include "subsystems/HatchSubsystem.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/driverstation/XboxController.hpp"
#include "wpi/smartdashboard/SendableChooser.hpp"
/**
* This class is where the bulk of the robot should be declared. Since

View File

@@ -4,12 +4,11 @@
#pragma once
#include <wpi/commands2/CommandHelper.hpp>
#include <wpi/commands2/SequentialCommandGroup.hpp>
#include "Constants.hpp"
#include "commands/DriveDistance.hpp"
#include "commands/ReleaseHatch.hpp"
#include "wpi/commands2/CommandHelper.hpp"
#include "wpi/commands2/SequentialCommandGroup.hpp"
/**
* A complex auto command that drives forward, releases a hatch, and then drives

View File

@@ -6,10 +6,9 @@
#include <functional>
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/CommandHelper.hpp>
#include "subsystems/DriveSubsystem.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/CommandHelper.hpp"
/**
* A command to drive the robot with joystick input passed in through lambdas.

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/CommandHelper.hpp>
#include "subsystems/DriveSubsystem.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/CommandHelper.hpp"
class DriveDistance
: public wpi::cmd::CommandHelper<wpi::cmd::Command, DriveDistance> {

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/CommandHelper.hpp>
#include "subsystems/HatchSubsystem.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/CommandHelper.hpp"
/**
* A simple command that grabs a hatch with the HatchSubsystem. Written

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/CommandHelper.hpp>
#include "subsystems/DriveSubsystem.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/CommandHelper.hpp"
class HalveDriveSpeed
: public wpi::cmd::CommandHelper<wpi::cmd::Command, HalveDriveSpeed> {

View File

@@ -4,10 +4,9 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/CommandHelper.hpp>
#include "subsystems/HatchSubsystem.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/CommandHelper.hpp"
/**
* A simple command that releases a hatch with the HatchSubsystem. Written

View File

@@ -4,12 +4,11 @@
#pragma once
#include <wpi/commands2/SubsystemBase.hpp>
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include "Constants.hpp"
#include "wpi/commands2/SubsystemBase.hpp"
#include "wpi/drive/DifferentialDrive.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
class DriveSubsystem : public wpi::cmd::SubsystemBase {
public:

View File

@@ -4,11 +4,10 @@
#pragma once
#include <wpi/commands2/SubsystemBase.hpp>
#include <wpi/hardware/pneumatic/DoubleSolenoid.hpp>
#include <wpi/hardware/pneumatic/PneumaticsControlModule.hpp>
#include "Constants.hpp"
#include "wpi/commands2/SubsystemBase.hpp"
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
class HatchSubsystem : public wpi::cmd::SubsystemBase {
public:

View File

@@ -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 <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "wpi/driverstation/XboxController.hpp"
#include "wpi/framework/TimedRobot.hpp"
/**
* This is a demo program showing the use of GenericHID's rumble feature.

View File

@@ -5,8 +5,9 @@
#include <opencv2/core/core.hpp>
#include <opencv2/core/types.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <wpi/cameraserver/CameraServer.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "wpi/cameraserver/CameraServer.hpp"
#include "wpi/framework/TimedRobot.hpp"
/**
* This is a demo program showing the use of OpenCV to do vision processing. The

View File

@@ -7,8 +7,9 @@
#include <string>
#include <fmt/format.h>
#include <wpi/driverstation/DriverStation.hpp>
#include <wpi/system/Timer.hpp>
#include "wpi/driverstation/DriverStation.hpp"
#include "wpi/system/Timer.hpp"
void Robot::RobotPeriodic() {
// Creates a string to hold current robot state information, including

View File

@@ -6,8 +6,8 @@
#include <array>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/bus/I2C.hpp>
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/bus/I2C.hpp"
/**
* This is a sample program demonstrating how to communicate to a light

View File

@@ -8,8 +8,9 @@
#include <opencv2/core/core.hpp>
#include <opencv2/core/types.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <wpi/cameraserver/CameraServer.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "wpi/cameraserver/CameraServer.hpp"
#include "wpi/framework/TimedRobot.hpp"
/**
* This is a demo program showing the use of OpenCV to do vision processing. The

View File

@@ -4,7 +4,7 @@
#include "Drivetrain.hpp"
#include <wpi/math/kinematics/ChassisSpeeds.hpp>
#include "wpi/math/kinematics/ChassisSpeeds.hpp"
wpi::math::MecanumDriveWheelSpeeds Drivetrain::GetCurrentState() const {
return {wpi::units::meters_per_second_t{m_frontLeftEncoder.GetRate()},

View File

@@ -2,11 +2,10 @@
// 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 <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/math/filter/SlewRateLimiter.hpp>
#include "Drivetrain.hpp"
#include "wpi/driverstation/XboxController.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/math/filter/SlewRateLimiter.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -6,15 +6,15 @@
#include <numbers>
#include <wpi/hardware/imu/OnboardIMU.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/math/geometry/Translation2d.hpp>
#include <wpi/math/kinematics/MecanumDriveKinematics.hpp>
#include <wpi/math/kinematics/MecanumDriveOdometry.hpp>
#include <wpi/math/kinematics/MecanumDriveWheelSpeeds.hpp>
#include "wpi/hardware/imu/OnboardIMU.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/math/geometry/Translation2d.hpp"
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/math/kinematics/MecanumDriveOdometry.hpp"
#include "wpi/math/kinematics/MecanumDriveWheelSpeeds.hpp"
/**
* Represents a mecanum drive style drivetrain.

View File

@@ -2,10 +2,10 @@
// 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 <wpi/drive/MecanumDrive.hpp>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include "wpi/drive/MecanumDrive.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
/**
* This is a demo program showing how to use Mecanum control with the

View File

@@ -4,9 +4,8 @@
#include "Drivetrain.hpp"
#include <wpi/system/Timer.hpp>
#include "ExampleGlobalMeasurementSensor.hpp"
#include "wpi/system/Timer.hpp"
wpi::math::MecanumDriveWheelSpeeds Drivetrain::GetCurrentState() const {
return {wpi::units::meters_per_second_t{m_frontLeftEncoder.GetRate()},

View File

@@ -2,11 +2,10 @@
// 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 <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/math/filter/SlewRateLimiter.hpp>
#include "Drivetrain.hpp"
#include "wpi/driverstation/XboxController.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/math/filter/SlewRateLimiter.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -6,16 +6,16 @@
#include <numbers>
#include <wpi/hardware/imu/OnboardIMU.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/math/estimator/MecanumDrivePoseEstimator.hpp>
#include <wpi/math/geometry/Translation2d.hpp>
#include <wpi/math/kinematics/MecanumDriveKinematics.hpp>
#include <wpi/math/kinematics/MecanumDriveOdometry.hpp>
#include <wpi/math/kinematics/MecanumDriveWheelSpeeds.hpp>
#include "wpi/hardware/imu/OnboardIMU.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/math/estimator/MecanumDrivePoseEstimator.hpp"
#include "wpi/math/geometry/Translation2d.hpp"
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/math/kinematics/MecanumDriveOdometry.hpp"
#include "wpi/math/kinematics/MecanumDriveWheelSpeeds.hpp"
/**
* Represents a mecanum drive style drivetrain.

View File

@@ -4,8 +4,8 @@
#pragma once
#include <wpi/math/geometry/Pose2d.hpp>
#include <wpi/math/util/StateSpaceUtil.hpp>
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/util/StateSpaceUtil.hpp"
/**
* This dummy class represents a global measurement sensor, such as a computer

View File

@@ -2,18 +2,18 @@
// 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 <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/AnalogPotentiometer.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/simulation/SimHooks.hpp>
#include <wpi/smartdashboard/Mechanism2d.hpp>
#include <wpi/smartdashboard/MechanismLigament2d.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/util/Color.hpp>
#include <wpi/util/Color8Bit.hpp>
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/AnalogPotentiometer.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/simulation/SimHooks.hpp"
#include "wpi/smartdashboard/Mechanism2d.hpp"
#include "wpi/smartdashboard/MechanismLigament2d.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/util/Color.hpp"
#include "wpi/util/Color8Bit.hpp"
/**
* This sample program shows how to use Mechanism2d - a visual representation of

View File

@@ -4,11 +4,11 @@
#include <numbers>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/smartdashboard/SmartDashboard.hpp"
/**
* This sample program shows how to control a motor using a joystick. In the

View File

@@ -6,12 +6,12 @@
#include <array>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/AnalogPotentiometer.hpp>
#include <wpi/math/controller/PIDController.hpp>
#include <wpi/units/length.hpp>
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/AnalogPotentiometer.hpp"
#include "wpi/math/controller/PIDController.hpp"
#include "wpi/units/length.hpp"
/**
* This is a sample program to demonstrate how to use a soft potentiometer and a

View File

@@ -4,8 +4,8 @@
#include <cstdio>
#include <wpi/cameraserver/CameraServer.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "wpi/cameraserver/CameraServer.hpp"
#include "wpi/framework/TimedRobot.hpp"
/**
* Uses the CameraServer class to automatically capture video from a USB webcam

View File

@@ -4,11 +4,10 @@
#include "RapidReactCommandBot.hpp"
#include <wpi/commands2/Command.hpp>
#include <wpi/commands2/Commands.hpp>
#include <wpi/commands2/button/Trigger.hpp>
#include "Constants.hpp"
#include "wpi/commands2/Command.hpp"
#include "wpi/commands2/Commands.hpp"
#include "wpi/commands2/button/Trigger.hpp"
void RapidReactCommandBot::ConfigureBindings() {
// Automatically run the storage motor whenever the ball storage is not full,

View File

@@ -6,8 +6,8 @@
#include <utility>
#include <wpi/commands2/Commands.hpp>
#include <wpi/system/RobotController.hpp>
#include "wpi/commands2/Commands.hpp"
#include "wpi/system/RobotController.hpp"
Drive::Drive() {
wpi::util::SendableRegistry::AddChild(&m_drive, &m_leftLeader);

View File

@@ -4,7 +4,7 @@
#include "subsystems/Shooter.hpp"
#include <wpi/commands2/Commands.hpp>
#include "wpi/commands2/Commands.hpp"
Shooter::Shooter() {
m_shooterFeedback.SetTolerance(ShooterConstants::kShooterTolerance.value());

View File

@@ -6,11 +6,11 @@
#include <numbers>
#include <wpi/units/angle.hpp>
#include <wpi/units/angular_velocity.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>
#include <wpi/units/voltage.hpp>
#include "wpi/units/angle.hpp"
#include "wpi/units/angular_velocity.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/time.hpp"
#include "wpi/units/voltage.hpp"
namespace DriveConstants {
inline constexpr int kLeftMotor1Port = 0;

View File

@@ -4,15 +4,14 @@
#pragma once
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/commands2/button/CommandXboxController.hpp>
#include "Constants.hpp"
#include "subsystems/Drive.hpp"
#include "subsystems/Intake.hpp"
#include "subsystems/Pneumatics.hpp"
#include "subsystems/Shooter.hpp"
#include "subsystems/Storage.hpp"
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/commands2/button/CommandXboxController.hpp"
/**
* This class is where the bulk of the robot should be declared. Since

View File

@@ -6,10 +6,9 @@
#include <optional>
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RapidReactCommandBot.hpp"
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/framework/TimedRobot.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -6,18 +6,17 @@
#include <functional>
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/commands2/SubsystemBase.hpp>
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/hardware/imu/OnboardIMU.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/ProfiledPIDController.hpp>
#include <wpi/math/controller/SimpleMotorFeedforward.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/units/length.hpp>
#include "Constants.hpp"
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/commands2/SubsystemBase.hpp"
#include "wpi/drive/DifferentialDrive.hpp"
#include "wpi/hardware/imu/OnboardIMU.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/rotation/Encoder.hpp"
#include "wpi/math/controller/ProfiledPIDController.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/length.hpp"
class Drive : public wpi::cmd::SubsystemBase {
public:

View File

@@ -6,12 +6,11 @@
#include <functional>
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/commands2/SubsystemBase.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/pneumatic/DoubleSolenoid.hpp>
#include "Constants.hpp"
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/commands2/SubsystemBase.hpp"
#include "wpi/hardware/motor/PWMSparkMax.hpp"
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
class Intake : public wpi::cmd::SubsystemBase {
public:

Some files were not shown because too many files have changed in this diff Show More