Move robot base classes from opmode to framework (#8344)

Having these in opmode will be confusing to users when opmodes are added.
This commit is contained in:
Peter Johnson
2025-11-08 15:08:38 -08:00
committed by GitHub
parent aeedfa588c
commit 18efd1e534
275 changed files with 285 additions and 285 deletions

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/opmode/TimedRobot.hpp>
class Robot : public wpi::TimedRobot {
public:

View File

@@ -16,10 +16,10 @@
#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/opmode/TimedRobot.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/units/length.hpp>

View File

@@ -4,8 +4,8 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* This is a demo program showing the use of the DifferentialDrive class.

View File

@@ -4,8 +4,8 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* This is a demo program showing the use of the DifferentialDrive class.

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "subsystems/Arm.hpp"

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/framework/TimedRobot.hpp>
#include <wpi/hardware/power/PowerDistribution.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
/**

View File

@@ -3,8 +3,8 @@
// 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 <wpi/opmode/TimedRobot.hpp>
#include "Drivetrain.hpp"

View File

@@ -3,8 +3,8 @@
// 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 <wpi/opmode/TimedRobot.hpp>
#include "Drivetrain.hpp"

View File

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

View File

@@ -7,7 +7,7 @@
#include <optional>
#include <wpi/commands2/Command.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"

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/rotation/DutyCycleEncoder.hpp>
#include <wpi/math/util/MathUtil.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
constexpr double fullRange = 1.3;

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/discrete/DigitalInput.hpp>
#include <wpi/hardware/rotation/DutyCycle.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
class Robot : public wpi::TimedRobot {

View File

@@ -5,9 +5,9 @@
#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/opmode/TimedRobot.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "subsystems/Elevator.hpp"

View File

@@ -5,12 +5,12 @@
#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/opmode/TimedRobot.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "subsystems/Elevator.hpp"

View File

@@ -5,9 +5,9 @@
#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/opmode/TimedRobot.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>

View File

@@ -4,8 +4,8 @@
#include <numbers>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
/**

View File

@@ -5,11 +5,11 @@
#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/opmode/TimedRobot.hpp>
#include <wpi/units/angular_velocity.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/time.hpp>

View File

@@ -3,12 +3,12 @@
// 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/opmode/TimedRobot.hpp>
#include <wpi/simulation/EncoderSim.hpp>
#include <wpi/simulation/FlywheelSim.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>

View File

@@ -4,8 +4,8 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/system/Timer.hpp>
class Robot : public wpi::TimedRobot {

View File

@@ -6,9 +6,9 @@
#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/opmode/TimedRobot.hpp>
/**
* This is a sample program to demonstrate how to use a gyro sensor to make a

View File

@@ -4,9 +4,9 @@
#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/opmode/TimedRobot.hpp>
/**
* This is a sample program that uses mecanum drive with a gyro sensor to

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"

View File

@@ -3,7 +3,7 @@
// the WPILib BSD license file in the root directory of this project.
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
/**
* This is a demo program showing the use of GenericHID's rumble feature.

View File

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

View File

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

View File

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

View File

@@ -3,8 +3,8 @@
// 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 <wpi/opmode/TimedRobot.hpp>
#include "Drivetrain.hpp"

View File

@@ -4,8 +4,8 @@
#include <wpi/drive/MecanumDrive.hpp>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* This is a demo program showing how to use Mecanum control with the

View File

@@ -3,8 +3,8 @@
// 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 <wpi/opmode/TimedRobot.hpp>
#include "Drivetrain.hpp"

View File

@@ -3,10 +3,10 @@
// 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/opmode/TimedRobot.hpp>
#include <wpi/simulation/SimHooks.hpp>
#include <wpi/smartdashboard/Mechanism2d.hpp>
#include <wpi/smartdashboard/MechanismLigament2d.hpp>

View File

@@ -5,9 +5,9 @@
#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/opmode/TimedRobot.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
/**

View File

@@ -7,10 +7,10 @@
#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/opmode/TimedRobot.hpp>
#include <wpi/units/length.hpp>
/**

View File

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

View File

@@ -7,7 +7,7 @@
#include <optional>
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RapidReactCommandBot.hpp"

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"

View File

@@ -3,10 +3,10 @@
// 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/controller/LTVUnicycleController.hpp>
#include <wpi/math/filter/SlewRateLimiter.hpp>
#include <wpi/math/trajectory/TrajectoryGenerator.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/system/Timer.hpp>
#include "Drivetrain.hpp"

View File

@@ -5,12 +5,12 @@
#pragma once
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/pneumatic/Compressor.hpp>
#include <wpi/hardware/pneumatic/DoubleSolenoid.hpp>
#include <wpi/hardware/pneumatic/PneumaticsControlModule.hpp>
#include <wpi/hardware/pneumatic/Solenoid.hpp>
#include <wpi/hardware/rotation/AnalogPotentiometer.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* This is a sample program showing the use of the solenoid classes during

View File

@@ -6,6 +6,7 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/LinearQuadraticRegulator.hpp>
@@ -14,7 +15,6 @@
#include <wpi/math/system/plant/DCMotor.hpp>
#include <wpi/math/system/plant/LinearSystemId.hpp>
#include <wpi/math/trajectory/TrapezoidProfile.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/units/angle.hpp>
#include <wpi/units/moment_of_inertia.hpp>

View File

@@ -6,6 +6,7 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/LinearQuadraticRegulator.hpp>
@@ -14,7 +15,6 @@
#include <wpi/math/system/plant/DCMotor.hpp>
#include <wpi/math/system/plant/LinearSystemId.hpp>
#include <wpi/math/trajectory/TrapezoidProfile.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/mass.hpp>

View File

@@ -7,6 +7,7 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/DriverStation.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/LinearQuadraticRegulator.hpp>
@@ -14,7 +15,6 @@
#include <wpi/math/system/LinearSystemLoop.hpp>
#include <wpi/math/system/plant/DCMotor.hpp>
#include <wpi/math/system/plant/LinearSystemId.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/units/angular_velocity.hpp>
/**

View File

@@ -7,6 +7,7 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/DriverStation.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/math/controller/LinearQuadraticRegulator.hpp>
@@ -14,7 +15,6 @@
#include <wpi/math/system/LinearSystemLoop.hpp>
#include <wpi/math/system/plant/DCMotor.hpp>
#include <wpi/math/system/plant/LinearSystemId.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* This is a sample program to demonstrate how to use a state-space controller

View File

@@ -3,9 +3,9 @@
// 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 <wpi/math/util/MathUtil.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include "Drivetrain.hpp"

View File

@@ -3,8 +3,8 @@
// 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 <wpi/opmode/TimedRobot.hpp>
#include "Drivetrain.hpp"

View File

@@ -7,7 +7,7 @@
#include <optional>
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "SysIdRoutineBot.hpp"

View File

@@ -4,8 +4,8 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* This is a demo program showing the use of the DifferentialDrive class.

View File

@@ -4,8 +4,8 @@
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/driverstation/XboxController.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/PWMSparkMax.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* This is a demo program showing the use of the DifferentialDrive class.

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/driverstation/Joystick.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "Constants.hpp"
#include "subsystems/Intake.hpp"

View File

@@ -5,7 +5,7 @@
#pragma once
#include <wpi/commands2/Command.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"

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/accelerometer/ADXL345_I2C.hpp>
#include <wpi/hardware/bus/I2C.hpp>
#include <wpi/hardware/discrete/AnalogInput.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* ADXL346, 362 Accelerometer snippets for frc-docs.

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/framework/TimedRobot.hpp>
#include <wpi/hardware/imu/OnboardIMU.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/units/acceleration.hpp>

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/imu/OnboardIMU.hpp>
#include <wpi/math/filter/LinearFilter.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/smartdashboard/SmartDashboard.hpp>
#include <wpi/units/acceleration.hpp>

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/accelerometer/AnalogAccelerometer.hpp>
#include <wpi/hardware/discrete/AnalogInput.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* AnalogAccelerometer snippets for frc-docs.

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/framework/TimedRobot.hpp>
#include <wpi/hardware/rotation/AnalogEncoder.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* AnalogEncoder snippets for frc-docs.

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/framework/TimedRobot.hpp>
#include <wpi/hardware/discrete/AnalogInput.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* AnalogInput snippets for frc-docs.

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/discrete/AnalogInput.hpp>
#include <wpi/hardware/rotation/AnalogPotentiometer.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* AnalogPotentiometer snippets for frc-docs.

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/framework/TimedRobot.hpp>
#include <wpi/hardware/discrete/DigitalInput.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* Digital Input snippets for frc-docs.

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/framework/TimedRobot.hpp>
#include <wpi/hardware/rotation/DutyCycleEncoder.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* DutyCycleEncoder snippets for frc-docs.

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/framework/TimedRobot.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/util/deprecated.hpp>
/**

View File

@@ -3,9 +3,9 @@
// the WPILib BSD license file in the root directory of this project.
#include <wpi/drive/DifferentialDrive.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/hardware/motor/Spark.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* Encoder drive to distance snippets for frc-docs.

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/motor/Spark.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* Encoder mechanism homing snippets for frc-docs.

View File

@@ -3,10 +3,10 @@
// 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/discrete/DigitalInput.hpp>
#include <wpi/hardware/motor/PWMVictorSPX.hpp>
#include <wpi/hardware/rotation/Encoder.hpp>
#include <wpi/opmode/TimedRobot.hpp>
/**
* Limit Switch snippets for frc-docs.

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/imu/OnboardIMU.hpp>
#include <wpi/math/geometry/Rotation2d.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/angle.hpp>

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/framework/TimedRobot.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/opmode/TimedRobot.hpp>
#include <wpi/units/acceleration.hpp>
#include <wpi/units/length.hpp>
#include <wpi/units/velocity.hpp>

View File

@@ -7,7 +7,7 @@
#include <optional>
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"

View File

@@ -7,7 +7,7 @@
#include <optional>
#include <wpi/commands2/CommandPtr.hpp>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include "RobotContainer.hpp"

View File

@@ -6,7 +6,7 @@
#include <atomic>
#include <wpi/opmode/RobotBase.hpp>
#include <wpi/framework/RobotBase.hpp>
class Robot : public wpi::RobotBase {
public:

View File

@@ -6,7 +6,7 @@
#include <string>
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
#include <wpi/smartdashboard/SendableChooser.hpp>
class Robot : public wpi::TimedRobot {

View File

@@ -4,7 +4,7 @@
#pragma once
#include <wpi/opmode/TimedRobot.hpp>
#include <wpi/framework/TimedRobot.hpp>
class Robot : public wpi::TimedRobot {
public:

View File

@@ -6,7 +6,7 @@
#include <string>
#include <wpi/opmode/TimesliceRobot.hpp>
#include <wpi/framework/TimesliceRobot.hpp>
#include <wpi/smartdashboard/SendableChooser.hpp>
class Robot : public wpi::TimesliceRobot {

View File

@@ -4,7 +4,7 @@
#pragma once
#include <wpi/opmode/TimesliceRobot.hpp>
#include <wpi/framework/TimesliceRobot.hpp>
class Robot : public wpi::TimesliceRobot {
public: