mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
It is much more reliable than the old approach, as it no longer depends on a magic string in a manifest file, and if the user changes their main class, or makes it not import from something RobotBase, it will fail to compile instead of failing at runtime. With requiring an importer, we should be able to automate this in the importer.
23 lines
832 B
Java
23 lines
832 B
Java
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
/* the project. */
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
import edu.wpi.first.wpilibj.RobotBase;
|
|
|
|
public final class Main {
|
|
private Main() {
|
|
}
|
|
|
|
/**
|
|
* Main initialization function. Do not perform any initialization here.
|
|
*
|
|
* <p>If you change your main robot class, change the parameter type.
|
|
*/
|
|
public static void main(String... args) {
|
|
RobotBase.startRobot(MyRobot::new);
|
|
}
|
|
}
|