mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
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:
@@ -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:
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
/**
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include <wpi/commands2/Command.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RobotContainer.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 <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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
/**
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <wpi/commands2/Command.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <wpi/commands2/Command.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
/**
|
||||
|
||||
@@ -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>
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include <wpi/commands2/CommandPtr.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RapidReactCommandBot.hpp"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <wpi/commands2/Command.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <wpi/commands2/Command.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include <wpi/commands2/CommandPtr.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "SysIdRoutineBot.hpp"
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <wpi/commands2/Command.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include <wpi/commands2/CommandPtr.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include <wpi/commands2/CommandPtr.hpp>
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
#include "RobotContainer.hpp"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include <wpi/opmode/RobotBase.hpp>
|
||||
#include <wpi/framework/RobotBase.hpp>
|
||||
|
||||
class Robot : public wpi::RobotBase {
|
||||
public:
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/framework/TimedRobot.hpp>
|
||||
|
||||
class Robot : public wpi::TimedRobot {
|
||||
public:
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wpi/opmode/TimesliceRobot.hpp>
|
||||
#include <wpi/framework/TimesliceRobot.hpp>
|
||||
|
||||
class Robot : public wpi::TimesliceRobot {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user