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

@@ -25,10 +25,10 @@ import java.util.function.Consumer;
import org.wpilib.command2.Command.InterruptionBehavior;
import org.wpilib.driverstation.DriverStation;
import org.wpilib.event.EventLoop;
import org.wpilib.framework.RobotBase;
import org.wpilib.framework.RobotState;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.hal.HAL;
import org.wpilib.opmode.RobotBase;
import org.wpilib.opmode.RobotState;
import org.wpilib.opmode.TimedRobot;
import org.wpilib.system.Watchdog;
import org.wpilib.util.sendable.Sendable;
import org.wpilib.util.sendable.SendableBuilder;

View File

@@ -12,13 +12,13 @@
#include "wpi/commands2/CommandPtr.hpp"
#include "wpi/commands2/Subsystem.hpp"
#include "wpi/framework/RobotBase.hpp"
#include "wpi/framework/RobotState.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/hal/HALBase.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/nt/IntegerArrayTopic.hpp"
#include "wpi/nt/StringArrayTopic.hpp"
#include "wpi/opmode/RobotBase.hpp"
#include "wpi/opmode/RobotState.hpp"
#include "wpi/opmode/TimedRobot.hpp"
#include "wpi/util/DenseMap.hpp"
#include "wpi/util/SmallVector.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"

View File

@@ -25,7 +25,7 @@ import org.wpilib.annotation.NoDiscard;
import org.wpilib.command3.button.CommandGenericHID;
import org.wpilib.command3.proto.SchedulerProto;
import org.wpilib.event.EventLoop;
import org.wpilib.opmode.TimedRobot;
import org.wpilib.framework.TimedRobot;
import org.wpilib.system.RobotController;
import org.wpilib.util.ErrorMessages;
import org.wpilib.util.protobuf.ProtobufSerializable;

View File

@@ -4,7 +4,7 @@
package frc.robot;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
public final class Main {
private Main() {}

View File

@@ -4,7 +4,7 @@
package frc.robot;
import org.wpilib.opmode.TimedRobot;
import org.wpilib.framework.TimedRobot;
public class Robot extends TimedRobot {
/**

View File

@@ -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 "wpi/opmode/TimedRobot.hpp"
#include "wpi/framework/TimedRobot.hpp"
class Robot : public wpi::TimedRobot {
public:

View File

@@ -385,7 +385,7 @@ public class AnnotationProcessor extends AbstractProcessor {
// Used to check for a main robot class
var robotBaseClass =
processingEnv.getElementUtils().getTypeElement("org.wpilib.opmode.TimedRobot").asType();
processingEnv.getElementUtils().getTypeElement("org.wpilib.framework.TimedRobot").asType();
boolean validFields = validateFields(annotatedElements);
boolean validMethods = validateMethods(annotatedElements);

View File

@@ -19,8 +19,8 @@ import org.wpilib.epilogue.EpilogueConfiguration;
* Generates the {@code Epilogue} file used as the main entry point to logging with Epilogue in a
* robot program. {@code Epilogue} has instances of every generated logger class, a {@link
* EpilogueConfiguration config} object, and (if the main robot class inherits from {@link
* org.wpilib.opmode.TimedRobot TimedRobot}) a {@code bind()} method to automatically add a periodic
* logging call to the robot.
* org.wpilib.framework.TimedRobot TimedRobot}) a {@code bind()} method to automatically add a
* periodic logging call to the robot.
*/
public class EpilogueGenerator {
private final ProcessingEnvironment m_processingEnv;

View File

@@ -74,7 +74,7 @@ class EpilogueGeneratorTest {
package org.wpilib.epilogue;
@Logged
class Example extends org.wpilib.opmode.RobotBase {
class Example extends org.wpilib.framework.RobotBase {
@Override
public void startCompetition() {}
@Override
@@ -128,7 +128,7 @@ class EpilogueGeneratorTest {
package org.wpilib.epilogue;
@Logged
class Example extends org.wpilib.opmode.TimedRobot {
class Example extends org.wpilib.framework.TimedRobot {
}
""";
@@ -210,10 +210,10 @@ class EpilogueGeneratorTest {
package org.wpilib.epilogue;
@Logged
class AlphaBot extends org.wpilib.opmode.TimedRobot { }
class AlphaBot extends org.wpilib.framework.TimedRobot { }
@Logged
class BetaBot extends org.wpilib.opmode.TimedRobot { }
class BetaBot extends org.wpilib.framework.TimedRobot { }
""";
String expected =

View File

@@ -11,13 +11,13 @@
#include <fmt/format.h>
#include "wpi/framework/RobotBase.hpp"
#include "wpi/hal/Ports.h"
#include "wpi/hal/REVPH.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/hardware/pneumatic/Compressor.hpp"
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
#include "wpi/hardware/pneumatic/Solenoid.hpp"
#include "wpi/opmode/RobotBase.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/SensorUtil.hpp"

View File

@@ -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 "wpi/opmode/IterativeRobotBase.hpp"
#include "wpi/framework/IterativeRobotBase.hpp"
#include "wpi/driverstation/DSControlWord.hpp"
#include "wpi/driverstation/DriverStation.hpp"

View File

@@ -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 "wpi/opmode/RobotState.hpp"
#include "wpi/framework/RobotState.hpp"
#include "wpi/driverstation/DriverStation.hpp"

View File

@@ -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 "wpi/opmode/TimedRobot.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include <stdint.h>

View File

@@ -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 "wpi/opmode/TimesliceRobot.hpp"
#include "wpi/framework/TimesliceRobot.hpp"
#include "wpi/system/Errors.hpp"

View File

@@ -16,9 +16,9 @@
#include "wpi/datalog/DataLogBackgroundWriter.hpp"
#include "wpi/datalog/FileLogger.hpp"
#include "wpi/driverstation/DriverStation.hpp"
#include "wpi/framework/RobotBase.hpp"
#include "wpi/hal/UsageReporting.h"
#include "wpi/nt/NetworkTableInstance.hpp"
#include "wpi/opmode/RobotBase.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/system/Filesystem.hpp"
#include "wpi/system/RobotController.hpp"

View File

@@ -6,7 +6,7 @@
#include <string>
#include "wpi/opmode/RobotBase.hpp"
#include "wpi/framework/RobotBase.hpp"
#include "wpi/util/fs.hpp"
std::string wpi::filesystem::GetLaunchDirectory() {

View File

@@ -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 "wpi/opmode/RobotBase.hpp"
#include "wpi/framework/RobotBase.hpp"
#ifdef __FRC_SYSTEMCORE__
#include <dlfcn.h>

View File

@@ -4,7 +4,7 @@
#pragma once
#include "wpi/opmode/RobotBase.hpp"
#include "wpi/framework/RobotBase.hpp"
#include "wpi/system/Watchdog.hpp"
#include "wpi/units/time.hpp"

View File

@@ -9,9 +9,9 @@
#include <utility>
#include <vector>
#include "wpi/framework/IterativeRobotBase.hpp"
#include "wpi/hal/Notifier.h"
#include "wpi/hal/Types.h"
#include "wpi/opmode/IterativeRobotBase.hpp"
#include "wpi/system/RobotController.hpp"
#include "wpi/units/frequency.hpp"
#include "wpi/units/math.hpp"

View File

@@ -6,7 +6,7 @@
#include <functional>
#include "wpi/opmode/TimedRobot.hpp"
#include "wpi/framework/TimedRobot.hpp"
#include "wpi/units/time.hpp"
namespace wpi {

View File

@@ -6,9 +6,9 @@
#include <string_view>
#include "wpi/framework/RobotBase.hpp"
#include "wpi/nt/NetworkTableInstance.hpp"
#include "wpi/nt/StringTopic.hpp"
#include "wpi/opmode/RobotBase.hpp"
namespace wpi::sim {

View File

@@ -119,7 +119,7 @@ ExpansionHubServo = "wpi/ExpansionHubServo.hpp"
Filesystem = "rpy/Filesystem.h"
Gamepad = "wpi/driverstation/Gamepad.hpp"
I2C = "wpi/hardware/bus/I2C.hpp"
IterativeRobotBase = "wpi/opmode/IterativeRobotBase.hpp"
IterativeRobotBase = "wpi/framework/IterativeRobotBase.hpp"
Joystick = "wpi/driverstation/Joystick.hpp"
LEDPattern = "wpi/hardware/led/LEDPattern.hpp"
MotorSafety = "wpi/hardware/motor/MotorSafety.hpp"
@@ -134,9 +134,9 @@ PneumaticsControlModule = "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
PneumaticsModuleType = "wpi/hardware/pneumatic/PneumaticsModuleType.hpp"
PowerDistribution = "wpi/hardware/power/PowerDistribution.hpp"
Preferences = "wpi/util/Preferences.hpp"
RobotBase = "wpi/opmode/RobotBase.hpp"
RobotBase = "wpi/framework/RobotBase.hpp"
RobotController = "wpi/system/RobotController.hpp"
RobotState = "wpi/opmode/RobotState.hpp"
RobotState = "wpi/framework/RobotState.hpp"
RuntimeType = "wpi/system/RuntimeType.hpp"
SensorUtil = "wpi/util/SensorUtil.hpp"
SerialPort = "wpi/hardware/bus/SerialPort.hpp"
@@ -145,9 +145,9 @@ Solenoid = "wpi/hardware/pneumatic/Solenoid.hpp"
StadiaController = "wpi/driverstation/StadiaController.hpp"
SystemServer = "wpi/system/SystemServer.hpp"
Threads = "wpi/system/Threads.hpp"
TimedRobot = "wpi/opmode/TimedRobot.hpp"
TimedRobot = "wpi/framework/TimedRobot.hpp"
Timer = "wpi/system/Timer.hpp"
TimesliceRobot = "wpi/opmode/TimesliceRobot.hpp"
TimesliceRobot = "wpi/framework/TimesliceRobot.hpp"
Tracer = "wpi/system/Tracer.hpp"
Watchdog = "wpi/system/Watchdog.hpp"
XboxController = "wpi/driverstation/XboxController.hpp"

View File

@@ -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 "wpi/opmode/TimedRobot.hpp" // NOLINT(build/include_order)
#include "wpi/framework/TimedRobot.hpp" // NOLINT(build/include_order)
#include <stdint.h>

View File

@@ -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 "wpi/opmode/TimesliceRobot.hpp" // NOLINT(build/include_order)
#include "wpi/framework/TimesliceRobot.hpp" // NOLINT(build/include_order)
#include <stdint.h>

View File

@@ -10,7 +10,7 @@
#include "callback_helpers/TestCallbackHelpers.hpp"
#include "wpi/driverstation/DriverStation.hpp"
#include "wpi/driverstation/Joystick.hpp"
#include "wpi/opmode/RobotState.hpp"
#include "wpi/framework/RobotState.hpp"
#include "wpi/simulation/DriverStationSim.hpp"
#include "wpi/simulation/SimHooks.hpp"

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 {

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