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

@@ -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 =