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

@@ -4,7 +4,7 @@
package org.wpilib.snippets.accelerometercollision;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,9 +4,9 @@
package org.wpilib.snippets.accelerometercollision;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.imu.OnboardIMU;
import org.wpilib.hardware.imu.OnboardIMU.MountOrientation;
import org.wpilib.opmode.TimedRobot;
import org.wpilib.smartdashboard.SmartDashboard;
/**

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.accelerometerfilter;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,10 +4,10 @@
package org.wpilib.snippets.accelerometerfilter;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.imu.OnboardIMU;
import org.wpilib.hardware.imu.OnboardIMU.MountOrientation;
import org.wpilib.math.filter.LinearFilter;
import org.wpilib.opmode.TimedRobot;
import org.wpilib.smartdashboard.SmartDashboard;
/**

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.adxlaccelerometers;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,9 +4,9 @@
package org.wpilib.snippets.adxlaccelerometers;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.accelerometer.ADXL345_I2C;
import org.wpilib.hardware.bus.I2C;
import org.wpilib.opmode.TimedRobot;
/**
* ADXL345, 362 Accelerometer snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.analogaccelerometer;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,8 +4,8 @@
package org.wpilib.snippets.analogaccelerometer;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.accelerometer.AnalogAccelerometer;
import org.wpilib.opmode.TimedRobot;
/**
* AnalogAccelerometer snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.analogencoder;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,8 +4,8 @@
package org.wpilib.snippets.analogencoder;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.rotation.AnalogEncoder;
import org.wpilib.opmode.TimedRobot;
/**
* AnalogEncoder snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.analoginput;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,8 +4,8 @@
package org.wpilib.snippets.analoginput;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.discrete.AnalogInput;
import org.wpilib.opmode.TimedRobot;
/**
* AnalogInput snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.analogpotentiometer;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,9 +4,9 @@
package org.wpilib.snippets.analogpotentiometer;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.discrete.AnalogInput;
import org.wpilib.hardware.rotation.AnalogPotentiometer;
import org.wpilib.opmode.TimedRobot;
/**
* AnalogPotentiometer snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.digitalinput;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,8 +4,8 @@
package org.wpilib.snippets.digitalinput;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.discrete.DigitalInput;
import org.wpilib.opmode.TimedRobot;
/**
* DigitalInput snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.dutycycleencoder;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,8 +4,8 @@
package org.wpilib.snippets.dutycycleencoder;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.rotation.DutyCycleEncoder;
import org.wpilib.opmode.TimedRobot;
/**
* DutyCycleEncoder snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.encoder;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,8 +4,8 @@
package org.wpilib.snippets.encoder;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.rotation.Encoder;
import org.wpilib.opmode.TimedRobot;
/**
* Encoder snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.encoderdrive;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -5,9 +5,9 @@
package org.wpilib.snippets.encoderdrive;
import org.wpilib.drive.DifferentialDrive;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.motor.Spark;
import org.wpilib.hardware.rotation.Encoder;
import org.wpilib.opmode.TimedRobot;
/**
* Encoder drive to distance snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.encoderhoming;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,10 +4,10 @@
package org.wpilib.snippets.encoderhoming;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.discrete.DigitalInput;
import org.wpilib.hardware.motor.Spark;
import org.wpilib.hardware.rotation.Encoder;
import org.wpilib.opmode.TimedRobot;
/**
* Encoder mechanism homing snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.limitswitch;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -5,9 +5,9 @@
package org.wpilib.snippets.limitswitch;
import org.wpilib.driverstation.Joystick;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.discrete.DigitalInput;
import org.wpilib.hardware.motor.PWMVictorSPX;
import org.wpilib.opmode.TimedRobot;
/**
* Limit Switch snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.onboardimu;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,9 +4,9 @@
package org.wpilib.snippets.onboardimu;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.imu.OnboardIMU;
import org.wpilib.hardware.imu.OnboardIMU.MountOrientation;
import org.wpilib.opmode.TimedRobot;
/**
* on board IMU snippets for frc-docs.

View File

@@ -4,7 +4,7 @@
package org.wpilib.snippets.profiledpidfeedforward;
import org.wpilib.opmode.RobotBase;
import org.wpilib.framework.RobotBase;
/**
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what

View File

@@ -4,12 +4,12 @@
package org.wpilib.snippets.profiledpidfeedforward;
import org.wpilib.framework.TimedRobot;
import org.wpilib.hardware.motor.PWMSparkMax;
import org.wpilib.hardware.rotation.Encoder;
import org.wpilib.math.controller.ProfiledPIDController;
import org.wpilib.math.controller.SimpleMotorFeedforward;
import org.wpilib.math.trajectory.TrapezoidProfile;
import org.wpilib.opmode.TimedRobot;
/**
* ProfiledPIDController with feedforward snippets for frc-docs.