mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
SCRIPT Run cc include replacements
This commit is contained in:
committed by
Peter Johnson
parent
f0a3c64121
commit
7c6efa41ae
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
Robot::Robot() {
|
||||
// Default to a length of 60, start empty output
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <frc/AddressableLED.h>
|
||||
#include <frc/LEDPattern.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/hardware/led/AddressableLED.hpp"
|
||||
#include "wpi/hardware/led/LEDPattern.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -8,20 +8,20 @@
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include <cameraserver/CameraServer.h>
|
||||
#include "wpi/cameraserver/CameraServer.hpp"
|
||||
#include <fmt/format.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/apriltag/AprilTagDetection.h>
|
||||
#include <frc/apriltag/AprilTagDetector.h>
|
||||
#include <frc/apriltag/AprilTagPoseEstimator.h>
|
||||
#include <frc/geometry/Transform3d.h>
|
||||
#include <networktables/IntegerArrayTopic.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/apriltag/AprilTagDetection.hpp"
|
||||
#include "wpi/apriltag/AprilTagDetector.hpp"
|
||||
#include "wpi/apriltag/AprilTagPoseEstimator.hpp"
|
||||
#include "wpi/math/geometry/Transform3d.hpp"
|
||||
#include "wpi/nt/IntegerArrayTopic.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/core/types.hpp>
|
||||
#include <opencv2/imgproc/imgproc.hpp>
|
||||
#include <units/angle.h>
|
||||
#include <units/length.h>
|
||||
#include "wpi/units/angle.hpp"
|
||||
#include "wpi/units/length.hpp"
|
||||
|
||||
/**
|
||||
* This is a demo program showing the detection of AprilTags.
|
||||
|
||||
@@ -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 <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/drive/DifferentialDrive.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
|
||||
/**
|
||||
* This is a demo program showing the use of the DifferentialDrive class.
|
||||
|
||||
@@ -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 <frc/TimedRobot.h>
|
||||
#include <frc/XboxController.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/driverstation/XboxController.hpp"
|
||||
#include "wpi/drive/DifferentialDrive.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
|
||||
/**
|
||||
* This is a demo program showing the use of the DifferentialDrive class.
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
void Robot::SimulationPeriodic() {
|
||||
m_arm.SimulationPeriodic();
|
||||
|
||||
@@ -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 "subsystems/Arm.h"
|
||||
#include "subsystems/Arm.hpp"
|
||||
|
||||
#include <frc/Preferences.h>
|
||||
#include <frc/RobotController.h>
|
||||
#include <frc/StateSpaceUtil.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/util/Preferences.hpp"
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
#include "wpi/math/util/StateSpaceUtil.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
Arm::Arm() {
|
||||
m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse);
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <units/angle.h>
|
||||
#include <units/length.h>
|
||||
#include <units/mass.h>
|
||||
#include <units/time.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
#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
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
|
||||
#include "subsystems/Arm.h"
|
||||
#include "subsystems/Arm.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate the use of arm simulation.
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/controller/ArmFeedforward.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc/simulation/BatterySim.h>
|
||||
#include <frc/simulation/EncoderSim.h>
|
||||
#include <frc/simulation/PWMSim.h>
|
||||
#include <frc/simulation/RoboRioSim.h>
|
||||
#include <frc/simulation/SingleJointedArmSim.h>
|
||||
#include <frc/smartdashboard/Mechanism2d.h>
|
||||
#include <frc/smartdashboard/MechanismLigament2d.h>
|
||||
#include <frc/smartdashboard/MechanismRoot2d.h>
|
||||
#include <units/length.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/math/controller/ArmFeedforward.hpp"
|
||||
#include "wpi/math/controller/PIDController.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.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.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
class Arm {
|
||||
public:
|
||||
|
||||
@@ -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 <frc/PowerDistribution.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/hardware/power/PowerDistribution.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program showing how to retrieve information from the Power
|
||||
|
||||
@@ -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 "Drivetrain.h"
|
||||
#include "Drivetrain.hpp"
|
||||
|
||||
void Drivetrain::SetSpeeds(const frc::DifferentialDriveWheelSpeeds& speeds) {
|
||||
const auto leftFeedforward = m_feedforward.Calculate(speeds.left);
|
||||
|
||||
@@ -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/TimedRobot.h>
|
||||
#include <frc/XboxController.h>
|
||||
#include <frc/filter/SlewRateLimiter.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/driverstation/XboxController.hpp"
|
||||
#include "wpi/math/filter/SlewRateLimiter.hpp"
|
||||
|
||||
#include "Drivetrain.h"
|
||||
#include "Drivetrain.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/OnboardIMU.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/kinematics/DifferentialDriveKinematics.h>
|
||||
#include <frc/kinematics/DifferentialDriveOdometry.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <units/angle.h>
|
||||
#include <units/angular_velocity.h>
|
||||
#include <units/length.h>
|
||||
#include <units/velocity.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/hardware/imu/OnboardIMU.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/hardware/motor/PWMSparkMax.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.
|
||||
|
||||
@@ -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 "Drivetrain.h"
|
||||
#include "Drivetrain.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -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/TimedRobot.h>
|
||||
#include <frc/XboxController.h>
|
||||
#include <frc/filter/SlewRateLimiter.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/driverstation/XboxController.hpp"
|
||||
#include "wpi/math/filter/SlewRateLimiter.hpp"
|
||||
|
||||
#include "Drivetrain.h"
|
||||
#include "Drivetrain.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -6,33 +6,33 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/ComputerVisionUtil.h>
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/OnboardIMU.h>
|
||||
#include <frc/RobotController.h>
|
||||
#include <frc/Timer.h>
|
||||
#include <frc/apriltag/AprilTagFieldLayout.h>
|
||||
#include <frc/apriltag/AprilTagFields.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/estimator/DifferentialDrivePoseEstimator.h>
|
||||
#include <frc/geometry/Pose2d.h>
|
||||
#include <frc/geometry/Pose3d.h>
|
||||
#include <frc/geometry/Quaternion.h>
|
||||
#include <frc/geometry/Transform3d.h>
|
||||
#include <frc/kinematics/DifferentialDriveKinematics.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc/simulation/DifferentialDrivetrainSim.h>
|
||||
#include <frc/simulation/EncoderSim.h>
|
||||
#include <frc/smartdashboard/Field2d.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <frc/system/plant/LinearSystemId.h>
|
||||
#include <networktables/DoubleArrayTopic.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
#include <units/angle.h>
|
||||
#include <units/angular_velocity.h>
|
||||
#include <units/length.h>
|
||||
#include <units/velocity.h>
|
||||
#include "wpi/math/util/ComputerVisionUtil.hpp"
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/hardware/imu/OnboardIMU.hpp"
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
#include "wpi/system/Timer.hpp"
|
||||
#include "wpi/apriltag/AprilTagFieldLayout.hpp"
|
||||
#include "wpi/apriltag/AprilTagFields.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/hardware/motor/PWMSparkMax.hpp"
|
||||
#include "wpi/simulation/DifferentialDrivetrainSim.hpp"
|
||||
#include "wpi/simulation/EncoderSim.hpp"
|
||||
#include "wpi/smartdashboard/Field2d.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
#include "wpi/math/system/plant/LinearSystemId.hpp"
|
||||
#include "wpi/nt/DoubleArrayTopic.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.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.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/StateSpaceUtil.h>
|
||||
#include <frc/geometry/Pose2d.h>
|
||||
#include "wpi/math/util/StateSpaceUtil.hpp"
|
||||
#include "wpi/math/geometry/Pose2d.hpp"
|
||||
|
||||
/**
|
||||
* This dummy class represents a global measurement sensor, such as a computer
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
#include <frc/DriverStation.h>
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
|
||||
void Robot::RobotPeriodic() {
|
||||
// pull alliance port high if on red alliance, pull low if on blue alliance
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <frc/DigitalOutput.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/hardware/discrete/DigitalOutput.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program demonstrating how to communicate to a light
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <frc2/command/CommandScheduler.h>
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
#include "wpi/commands2/CommandScheduler.hpp"
|
||||
|
||||
Robot::Robot() {}
|
||||
|
||||
|
||||
@@ -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 "RobotContainer.h"
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
#include <frc2/command/Commands.h>
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
|
||||
RobotContainer::RobotContainer() {
|
||||
// Initialize all of your commands and subsystems here
|
||||
|
||||
@@ -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 "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
|
||||
#include <frc/RobotController.h>
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
|
||||
using namespace DriveConstants;
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <units/acceleration.h>
|
||||
#include <units/length.h>
|
||||
#include <units/time.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
#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
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc2/command/Command.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
|
||||
#include "RobotContainer.h"
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc2/command/Command.h>
|
||||
#include <frc2/command/CommandPtr.h>
|
||||
#include <frc2/command/Commands.h>
|
||||
#include <frc2/command/button/CommandXboxController.h>
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
#include "wpi/commands2/CommandPtr.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/button/CommandXboxController.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "subsystems/DriveSubsystem.h"
|
||||
#include "Constants.hpp"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
|
||||
/**
|
||||
* This class is where the bulk of the robot should be declared. Since
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/Timer.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
#include <frc/trajectory/TrapezoidProfile.h>
|
||||
#include <frc2/command/CommandPtr.h>
|
||||
#include <frc2/command/SubsystemBase.h>
|
||||
#include <units/length.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/system/Timer.hpp"
|
||||
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
|
||||
#include "wpi/drive/DifferentialDrive.hpp"
|
||||
#include "wpi/math/trajectory/TrapezoidProfile.hpp"
|
||||
#include "wpi/commands2/CommandPtr.hpp"
|
||||
#include "wpi/commands2/SubsystemBase.hpp"
|
||||
#include "wpi/units/length.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "ExampleSmartMotorController.h"
|
||||
#include "Constants.hpp"
|
||||
#include "ExampleSmartMotorController.hpp"
|
||||
|
||||
class DriveSubsystem : public frc2::SubsystemBase {
|
||||
public:
|
||||
|
||||
@@ -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 <frc/DutyCycleEncoder.h>
|
||||
#include <frc/MathUtil.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/hardware/rotation/DutyCycleEncoder.hpp"
|
||||
#include "wpi/math/util/MathUtil.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
constexpr double fullRange = 1.3;
|
||||
constexpr double expectedZero = 0.0;
|
||||
|
||||
@@ -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 <frc/DigitalInput.h>
|
||||
#include <frc/DutyCycle.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/hardware/discrete/DigitalInput.hpp"
|
||||
#include "wpi/hardware/rotation/DutyCycle.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
frc::DutyCycle m_dutyCycle{0}; // Duty cycle input
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/trajectory/ExponentialProfile.h>
|
||||
#include <units/acceleration.h>
|
||||
#include <units/length.h>
|
||||
#include <units/time.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/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.h"
|
||||
#include "ExampleSmartMotorController.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
void Robot::RobotPeriodic() {
|
||||
// Update the telemetry, including mechanism visualization, regardless of
|
||||
|
||||
@@ -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 "subsystems/Elevator.h"
|
||||
#include "subsystems/Elevator.hpp"
|
||||
|
||||
#include <frc/RobotController.h>
|
||||
#include <frc/StateSpaceUtil.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
#include "wpi/math/util/StateSpaceUtil.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
Elevator::Elevator() {
|
||||
m_encoder.SetDistancePerPulse(Constants::kArmEncoderDistPerPulse);
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <units/acceleration.h>
|
||||
#include <units/angle.h>
|
||||
#include <units/length.h>
|
||||
#include <units/mass.h>
|
||||
#include <units/time.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
#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
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
|
||||
#include "subsystems/Elevator.h"
|
||||
#include "subsystems/Elevator.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate the use of elevator simulation.
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/controller/ElevatorFeedforward.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc/simulation/BatterySim.h>
|
||||
#include <frc/simulation/ElevatorSim.h>
|
||||
#include <frc/simulation/EncoderSim.h>
|
||||
#include <frc/simulation/PWMMotorControllerSim.h>
|
||||
#include <frc/simulation/RoboRioSim.h>
|
||||
#include <frc/smartdashboard/Mechanism2d.h>
|
||||
#include <frc/smartdashboard/MechanismLigament2d.h>
|
||||
#include <frc/smartdashboard/MechanismRoot2d.h>
|
||||
#include <frc/trajectory/ExponentialProfile.h>
|
||||
#include <units/length.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/math/controller/ElevatorFeedforward.hpp"
|
||||
#include "wpi/math/controller/PIDController.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.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/math/trajectory/ExponentialProfile.hpp"
|
||||
#include "wpi/units/length.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
class Elevator {
|
||||
public:
|
||||
|
||||
@@ -4,18 +4,18 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/controller/ElevatorFeedforward.h>
|
||||
#include <frc/controller/ProfiledPIDController.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc/trajectory/TrapezoidProfile.h>
|
||||
#include <units/acceleration.h>
|
||||
#include <units/length.h>
|
||||
#include <units/time.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/math/controller/ElevatorFeedforward.hpp"
|
||||
#include "wpi/math/controller/ProfiledPIDController.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.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 frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
void Robot::RobotPeriodic() {
|
||||
// Update the telemetry, including mechanism visualization, regardless of
|
||||
|
||||
@@ -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 "subsystems/Elevator.h"
|
||||
#include "subsystems/Elevator.hpp"
|
||||
|
||||
#include <frc/RobotController.h>
|
||||
#include <frc/StateSpaceUtil.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
#include "wpi/math/util/StateSpaceUtil.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
Elevator::Elevator() {
|
||||
m_encoder.SetDistancePerPulse(Constants::kArmEncoderDistPerPulse);
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <units/acceleration.h>
|
||||
#include <units/angle.h>
|
||||
#include <units/length.h>
|
||||
#include <units/mass.h>
|
||||
#include <units/time.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
#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
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
|
||||
#include "subsystems/Elevator.h"
|
||||
#include "subsystems/Elevator.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate the use of elevator simulation.
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/controller/ElevatorFeedforward.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/controller/ProfiledPIDController.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc/simulation/BatterySim.h>
|
||||
#include <frc/simulation/ElevatorSim.h>
|
||||
#include <frc/simulation/EncoderSim.h>
|
||||
#include <frc/simulation/PWMMotorControllerSim.h>
|
||||
#include <frc/simulation/RoboRioSim.h>
|
||||
#include <frc/smartdashboard/Mechanism2d.h>
|
||||
#include <frc/smartdashboard/MechanismLigament2d.h>
|
||||
#include <frc/smartdashboard/MechanismRoot2d.h>
|
||||
#include <units/length.h>
|
||||
#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/hardware/motor/PWMSparkMax.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.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
class Elevator {
|
||||
public:
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/trajectory/TrapezoidProfile.h>
|
||||
#include <units/acceleration.h>
|
||||
#include <units/length.h>
|
||||
#include <units/time.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/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.h"
|
||||
#include "ExampleSmartMotorController.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
/**
|
||||
* Sample program displaying the value of a quadrature encoder on the
|
||||
|
||||
@@ -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 <frc/Encoder.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/event/BooleanEvent.h>
|
||||
#include <frc/event/EventLoop.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <units/angular_velocity.h>
|
||||
#include <units/length.h>
|
||||
#include <units/time.h>
|
||||
#include <units/voltage.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/math/controller/PIDController.hpp"
|
||||
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
|
||||
#include "wpi/event/BooleanEvent.hpp"
|
||||
#include "wpi/event/EventLoop.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.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;
|
||||
|
||||
@@ -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 <frc/Encoder.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/controller/BangBangController.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc/simulation/EncoderSim.h>
|
||||
#include <frc/simulation/FlywheelSim.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <frc/system/plant/LinearSystemId.h>
|
||||
#include <units/moment_of_inertia.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/math/controller/BangBangController.hpp"
|
||||
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
#include "wpi/simulation/EncoderSim.hpp"
|
||||
#include "wpi/simulation/FlywheelSim.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
#include "wpi/math/system/plant/LinearSystemId.hpp"
|
||||
#include "wpi/units/moment_of_inertia.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate the use of a BangBangController with
|
||||
|
||||
@@ -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/TimedRobot.h>
|
||||
#include <frc/Timer.h>
|
||||
#include <frc/XboxController.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/system/Timer.hpp"
|
||||
#include "wpi/driverstation/XboxController.hpp"
|
||||
#include "wpi/drive/DifferentialDrive.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/OnboardIMU.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/hardware/imu/OnboardIMU.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/drive/DifferentialDrive.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate how to use a gyro sensor to make a
|
||||
|
||||
@@ -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/Joystick.h>
|
||||
#include <frc/OnboardIMU.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/drive/MecanumDrive.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/hardware/imu/OnboardIMU.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/drive/MecanumDrive.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program that uses mecanum drive with a gyro sensor to
|
||||
|
||||
@@ -15,7 +15,7 @@ that want even more control over what code runs on their robot.
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <hal/HAL.h>
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
enum DriverStationMode {
|
||||
DisabledMode,
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
#include <frc/DataLogManager.h>
|
||||
#include <frc/DriverStation.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <frc2/command/CommandScheduler.h>
|
||||
#include "wpi/system/DataLogManager.hpp"
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
#include "wpi/commands2/CommandScheduler.hpp"
|
||||
|
||||
Robot::Robot() {
|
||||
// Start recording to data log
|
||||
|
||||
@@ -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 "RobotContainer.h"
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
RobotContainer::RobotContainer() {
|
||||
// Initialize all of your commands and subsystems here
|
||||
|
||||
@@ -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 "commands/Autos.h"
|
||||
#include "commands/Autos.hpp"
|
||||
|
||||
#include <frc2/command/Commands.h>
|
||||
#include <frc2/command/FunctionalCommand.h>
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/FunctionalCommand.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
using namespace AutoConstants;
|
||||
|
||||
|
||||
@@ -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 "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
|
||||
#include <wpi/sendable/SendableBuilder.h>
|
||||
#include "wpi/util/sendable/SendableBuilder.hpp"
|
||||
|
||||
using namespace DriveConstants;
|
||||
|
||||
|
||||
@@ -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 "subsystems/HatchSubsystem.h"
|
||||
#include "subsystems/HatchSubsystem.hpp"
|
||||
|
||||
#include <wpi/sendable/SendableBuilder.h>
|
||||
#include "wpi/util/sendable/SendableBuilder.hpp"
|
||||
|
||||
using namespace HatchConstants;
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc2/command/Command.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
|
||||
#include "RobotContainer.h"
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/smartdashboard/SendableChooser.h>
|
||||
#include <frc2/command/Command.h>
|
||||
#include <frc2/command/Commands.h>
|
||||
#include <frc2/command/button/CommandPS4Controller.h>
|
||||
#include "wpi/smartdashboard/SendableChooser.hpp"
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/button/CommandPS4Controller.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "commands/Autos.h"
|
||||
#include "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/HatchSubsystem.h"
|
||||
#include "Constants.hpp"
|
||||
#include "commands/Autos.hpp"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
#include "subsystems/HatchSubsystem.hpp"
|
||||
|
||||
namespace ac = AutoConstants;
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc2/command/CommandPtr.h>
|
||||
#include "wpi/commands2/CommandPtr.hpp"
|
||||
|
||||
#include "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/HatchSubsystem.h"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
#include "subsystems/HatchSubsystem.hpp"
|
||||
|
||||
/** Container for auto command factories. */
|
||||
namespace autos {
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc2/command/SubsystemBase.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/drive/DifferentialDrive.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
#include "wpi/commands2/SubsystemBase.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
class DriveSubsystem : public frc2::SubsystemBase {
|
||||
public:
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/DoubleSolenoid.h>
|
||||
#include <frc/PneumaticsControlModule.h>
|
||||
#include <frc2/command/CommandPtr.h>
|
||||
#include <frc2/command/SubsystemBase.h>
|
||||
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
|
||||
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
|
||||
#include "wpi/commands2/CommandPtr.hpp"
|
||||
#include "wpi/commands2/SubsystemBase.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
class HatchSubsystem : public frc2::SubsystemBase {
|
||||
public:
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
#include <frc/DataLogManager.h>
|
||||
#include <frc/DriverStation.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <frc2/command/CommandScheduler.h>
|
||||
#include "wpi/system/DataLogManager.hpp"
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
#include "wpi/commands2/CommandScheduler.hpp"
|
||||
|
||||
Robot::Robot() {
|
||||
// Start recording to data log
|
||||
|
||||
@@ -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 "RobotContainer.h"
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <frc2/command/button/JoystickButton.h>
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
#include "wpi/commands2/button/JoystickButton.hpp"
|
||||
|
||||
#include "commands/DefaultDrive.h"
|
||||
#include "commands/GrabHatch.h"
|
||||
#include "commands/HalveDriveSpeed.h"
|
||||
#include "commands/ReleaseHatch.h"
|
||||
#include "commands/DefaultDrive.hpp"
|
||||
#include "commands/GrabHatch.hpp"
|
||||
#include "commands/HalveDriveSpeed.hpp"
|
||||
#include "commands/ReleaseHatch.hpp"
|
||||
|
||||
RobotContainer::RobotContainer() {
|
||||
// Initialize all of your commands and subsystems here
|
||||
|
||||
@@ -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 "commands/ComplexAuto.h"
|
||||
#include "commands/ComplexAuto.hpp"
|
||||
|
||||
using namespace AutoConstants;
|
||||
|
||||
|
||||
@@ -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 "commands/DefaultDrive.h"
|
||||
#include "commands/DefaultDrive.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
@@ -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 "commands/DriveDistance.h"
|
||||
#include "commands/DriveDistance.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
||||
@@ -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 "commands/GrabHatch.h"
|
||||
#include "commands/GrabHatch.hpp"
|
||||
|
||||
GrabHatch::GrabHatch(HatchSubsystem* subsystem) : m_hatch(subsystem) {
|
||||
AddRequirements(subsystem);
|
||||
|
||||
@@ -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 "commands/HalveDriveSpeed.h"
|
||||
#include "commands/HalveDriveSpeed.hpp"
|
||||
|
||||
HalveDriveSpeed::HalveDriveSpeed(DriveSubsystem* subsystem)
|
||||
: m_drive(subsystem) {}
|
||||
|
||||
@@ -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 "commands/ReleaseHatch.h"
|
||||
#include "commands/ReleaseHatch.hpp"
|
||||
|
||||
ReleaseHatch::ReleaseHatch(HatchSubsystem* subsystem) : m_hatch(subsystem) {
|
||||
AddRequirements(subsystem);
|
||||
|
||||
@@ -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 "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
|
||||
#include <wpi/sendable/SendableBuilder.h>
|
||||
#include "wpi/util/sendable/SendableBuilder.hpp"
|
||||
|
||||
using namespace DriveConstants;
|
||||
|
||||
|
||||
@@ -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 "subsystems/HatchSubsystem.h"
|
||||
#include "subsystems/HatchSubsystem.hpp"
|
||||
|
||||
#include <wpi/sendable/SendableBuilder.h>
|
||||
#include "wpi/util/sendable/SendableBuilder.hpp"
|
||||
|
||||
using namespace HatchConstants;
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc2/command/Command.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
|
||||
#include "RobotContainer.h"
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/XboxController.h>
|
||||
#include <frc/smartdashboard/SendableChooser.h>
|
||||
#include <frc2/command/Command.h>
|
||||
#include "wpi/driverstation/XboxController.hpp"
|
||||
#include "wpi/smartdashboard/SendableChooser.hpp"
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "commands/ComplexAuto.h"
|
||||
#include "commands/DefaultDrive.h"
|
||||
#include "commands/DriveDistance.h"
|
||||
#include "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/HatchSubsystem.h"
|
||||
#include "Constants.hpp"
|
||||
#include "commands/ComplexAuto.hpp"
|
||||
#include "commands/DefaultDrive.hpp"
|
||||
#include "commands/DriveDistance.hpp"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
#include "subsystems/HatchSubsystem.hpp"
|
||||
|
||||
/**
|
||||
* This class is where the bulk of the robot should be declared. Since
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
#include <frc2/command/SequentialCommandGroup.h>
|
||||
#include "wpi/commands2/CommandHelper.hpp"
|
||||
#include "wpi/commands2/SequentialCommandGroup.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "commands/DriveDistance.h"
|
||||
#include "commands/ReleaseHatch.h"
|
||||
#include "Constants.hpp"
|
||||
#include "commands/DriveDistance.hpp"
|
||||
#include "commands/ReleaseHatch.hpp"
|
||||
|
||||
/**
|
||||
* A complex auto command that drives forward, releases a hatch, and then drives
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include <frc2/command/Command.h>
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
#include "wpi/commands2/CommandHelper.hpp"
|
||||
|
||||
#include "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
|
||||
/**
|
||||
* A command to drive the robot with joystick input passed in through lambdas.
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc2/command/Command.h>
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
#include "wpi/commands2/CommandHelper.hpp"
|
||||
|
||||
#include "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
|
||||
class DriveDistance : public frc2::CommandHelper<frc2::Command, DriveDistance> {
|
||||
public:
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc2/command/Command.h>
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
#include "wpi/commands2/CommandHelper.hpp"
|
||||
|
||||
#include "subsystems/HatchSubsystem.h"
|
||||
#include "subsystems/HatchSubsystem.hpp"
|
||||
|
||||
/**
|
||||
* A simple command that grabs a hatch with the HatchSubsystem. Written
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc2/command/Command.h>
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
#include "wpi/commands2/CommandHelper.hpp"
|
||||
|
||||
#include "subsystems/DriveSubsystem.h"
|
||||
#include "subsystems/DriveSubsystem.hpp"
|
||||
|
||||
class HalveDriveSpeed
|
||||
: public frc2::CommandHelper<frc2::Command, HalveDriveSpeed> {
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc2/command/Command.h>
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
#include "wpi/commands2/CommandHelper.hpp"
|
||||
|
||||
#include "subsystems/HatchSubsystem.h"
|
||||
#include "subsystems/HatchSubsystem.hpp"
|
||||
|
||||
/**
|
||||
* A simple command that releases a hatch with the HatchSubsystem. Written
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc2/command/SubsystemBase.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/drive/DifferentialDrive.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
#include "wpi/commands2/SubsystemBase.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
class DriveSubsystem : public frc2::SubsystemBase {
|
||||
public:
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/DoubleSolenoid.h>
|
||||
#include <frc/PneumaticsControlModule.h>
|
||||
#include <frc2/command/SubsystemBase.h>
|
||||
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
|
||||
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
|
||||
#include "wpi/commands2/SubsystemBase.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
class HatchSubsystem : public frc2::SubsystemBase {
|
||||
public:
|
||||
|
||||
@@ -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/TimedRobot.h>
|
||||
#include <frc/XboxController.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/driverstation/XboxController.hpp"
|
||||
|
||||
/**
|
||||
* This is a demo program showing the use of GenericHID's rumble feature.
|
||||
|
||||
@@ -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 <cameraserver/CameraServer.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/cameraserver/CameraServer.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/core/types.hpp>
|
||||
#include <opencv2/imgproc/imgproc.hpp>
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <frc/DriverStation.h>
|
||||
#include <frc/Timer.h>
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
#include "wpi/system/Timer.hpp"
|
||||
|
||||
void Robot::RobotPeriodic() {
|
||||
// Creates a string to hold current robot state information, including
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <frc/I2C.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/hardware/bus/I2C.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program demonstrating how to communicate to a light
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include <cstdio>
|
||||
#include <thread>
|
||||
|
||||
#include <cameraserver/CameraServer.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/cameraserver/CameraServer.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/core/types.hpp>
|
||||
#include <opencv2/imgproc/imgproc.hpp>
|
||||
|
||||
@@ -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 "Drivetrain.h"
|
||||
#include "Drivetrain.hpp"
|
||||
|
||||
#include <frc/kinematics/ChassisSpeeds.h>
|
||||
#include "wpi/math/kinematics/ChassisSpeeds.hpp"
|
||||
|
||||
frc::MecanumDriveWheelSpeeds Drivetrain::GetCurrentState() const {
|
||||
return {units::meters_per_second_t{m_frontLeftEncoder.GetRate()},
|
||||
|
||||
@@ -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/TimedRobot.h>
|
||||
#include <frc/XboxController.h>
|
||||
#include <frc/filter/SlewRateLimiter.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/driverstation/XboxController.hpp"
|
||||
#include "wpi/math/filter/SlewRateLimiter.hpp"
|
||||
|
||||
#include "Drivetrain.h"
|
||||
#include "Drivetrain.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/OnboardIMU.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/geometry/Translation2d.h>
|
||||
#include <frc/kinematics/MecanumDriveKinematics.h>
|
||||
#include <frc/kinematics/MecanumDriveOdometry.h>
|
||||
#include <frc/kinematics/MecanumDriveWheelSpeeds.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/hardware/imu/OnboardIMU.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/motor/PWMSparkMax.hpp"
|
||||
|
||||
/**
|
||||
* Represents a mecanum drive style drivetrain.
|
||||
|
||||
@@ -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 <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/drive/MecanumDrive.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/drive/MecanumDrive.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
|
||||
/**
|
||||
* This is a demo program showing how to use Mecanum control with the
|
||||
|
||||
@@ -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 "Drivetrain.h"
|
||||
#include "Drivetrain.hpp"
|
||||
|
||||
#include <frc/Timer.h>
|
||||
#include "wpi/system/Timer.hpp"
|
||||
|
||||
#include "ExampleGlobalMeasurementSensor.h"
|
||||
#include "ExampleGlobalMeasurementSensor.hpp"
|
||||
|
||||
frc::MecanumDriveWheelSpeeds Drivetrain::GetCurrentState() const {
|
||||
return {units::meters_per_second_t{m_frontLeftEncoder.GetRate()},
|
||||
|
||||
@@ -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/TimedRobot.h>
|
||||
#include <frc/XboxController.h>
|
||||
#include <frc/filter/SlewRateLimiter.h>
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/driverstation/XboxController.hpp"
|
||||
#include "wpi/math/filter/SlewRateLimiter.hpp"
|
||||
|
||||
#include "Drivetrain.h"
|
||||
#include "Drivetrain.hpp"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/OnboardIMU.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/estimator/MecanumDrivePoseEstimator.h>
|
||||
#include <frc/geometry/Translation2d.h>
|
||||
#include <frc/kinematics/MecanumDriveKinematics.h>
|
||||
#include <frc/kinematics/MecanumDriveOdometry.h>
|
||||
#include <frc/kinematics/MecanumDriveWheelSpeeds.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/hardware/imu/OnboardIMU.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/motor/PWMSparkMax.hpp"
|
||||
|
||||
/**
|
||||
* Represents a mecanum drive style drivetrain.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/StateSpaceUtil.h>
|
||||
#include <frc/geometry/Pose2d.h>
|
||||
#include "wpi/math/util/StateSpaceUtil.hpp"
|
||||
#include "wpi/math/geometry/Pose2d.hpp"
|
||||
|
||||
/**
|
||||
* This dummy class represents a global measurement sensor, such as a computer
|
||||
|
||||
@@ -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 <frc/AnalogPotentiometer.h>
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc/simulation/SimHooks.h>
|
||||
#include <frc/smartdashboard/Mechanism2d.h>
|
||||
#include <frc/smartdashboard/MechanismLigament2d.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <frc/util/Color.h>
|
||||
#include <frc/util/Color8Bit.h>
|
||||
#include <units/angle.h>
|
||||
#include "wpi/hardware/rotation/AnalogPotentiometer.hpp"
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
#include "wpi/smartdashboard/Mechanism2d.hpp"
|
||||
#include "wpi/smartdashboard/MechanismLigament2d.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
#include "wpi/util/Color.hpp"
|
||||
#include "wpi/util/Color8Bit.hpp"
|
||||
#include "wpi/units/angle.hpp"
|
||||
|
||||
/**
|
||||
* This sample program shows how to use Mechanism2d - a visual representation of
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include "wpi/hardware/rotation/Encoder.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
#include "wpi/smartdashboard/SmartDashboard.hpp"
|
||||
|
||||
/**
|
||||
* This sample program shows how to control a motor using a joystick. In the
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
void Robot::TeleopInit() {
|
||||
// Move to the bottom setpoint when teleop starts
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <frc/AnalogPotentiometer.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <units/length.h>
|
||||
#include "wpi/hardware/rotation/AnalogPotentiometer.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
#include "wpi/math/controller/PIDController.hpp"
|
||||
#include "wpi/hardware/motor/PWMSparkMax.hpp"
|
||||
#include "wpi/units/length.hpp"
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate how to use a soft potentiometer and a
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include <cameraserver/CameraServer.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include "wpi/cameraserver/CameraServer.hpp"
|
||||
#include "wpi/opmode/TimedRobot.hpp"
|
||||
|
||||
/**
|
||||
* Uses the CameraServer class to automatically capture video from a USB webcam
|
||||
|
||||
@@ -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 "RapidReactCommandBot.h"
|
||||
#include "RapidReactCommandBot.hpp"
|
||||
|
||||
#include <frc2/command/Command.h>
|
||||
#include <frc2/command/Commands.h>
|
||||
#include <frc2/command/button/Trigger.h>
|
||||
#include "wpi/commands2/Command.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/button/Trigger.hpp"
|
||||
|
||||
#include "Constants.h"
|
||||
#include "Constants.hpp"
|
||||
|
||||
void RapidReactCommandBot::ConfigureBindings() {
|
||||
// Automatically run the storage motor whenever the ball storage is not full,
|
||||
|
||||
@@ -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 "Robot.h"
|
||||
#include "Robot.hpp"
|
||||
|
||||
Robot::Robot() {
|
||||
// Configure default commands and condition bindings on robot startup
|
||||
|
||||
@@ -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 "subsystems/Drive.h"
|
||||
#include "subsystems/Drive.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <frc/RobotController.h>
|
||||
#include <frc2/command/Commands.h>
|
||||
#include "wpi/system/RobotController.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
|
||||
Drive::Drive() {
|
||||
wpi::SendableRegistry::AddChild(&m_drive, &m_leftLeader);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user