first commit
This commit is contained in:
		
							
								
								
									
										3
									
								
								src/main/deploy/example.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/main/deploy/example.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| Files placed in this directory will be deployed to the RoboRIO into the | ||||
| 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function | ||||
| to get a proper path relative to the deploy directory. | ||||
							
								
								
									
										15
									
								
								src/main/java/frc/robot/Main.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/main/java/frc/robot/Main.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| // Copyright (c) FIRST and other WPILib contributors. | ||||
| // 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. | ||||
|  | ||||
| package frc.robot; | ||||
|  | ||||
| import edu.wpi.first.wpilibj.RobotBase; | ||||
|  | ||||
| public final class Main { | ||||
|   private Main() {} | ||||
|  | ||||
|   public static void main(String... args) { | ||||
|     RobotBase.startRobot(Robot::new); | ||||
|   } | ||||
| } | ||||
							
								
								
									
										72
									
								
								src/main/java/frc/robot/Robot.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								src/main/java/frc/robot/Robot.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | ||||
| // Copyright (c) FIRST and other WPILib contributors. | ||||
| // 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. | ||||
|  | ||||
| package frc.robot; | ||||
|  | ||||
| import edu.wpi.first.wpilibj.TimedRobot; | ||||
| import edu.wpi.first.wpilibj2.command.Command; | ||||
| import edu.wpi.first.wpilibj2.command.CommandScheduler; | ||||
|  | ||||
| public class Robot extends TimedRobot { | ||||
|   private Command m_autonomousCommand; | ||||
|  | ||||
|   private final RobotContainer m_robotContainer; | ||||
|  | ||||
|   public Robot() { | ||||
|     m_robotContainer = new RobotContainer(); | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public void robotPeriodic() { | ||||
|     CommandScheduler.getInstance().run(); | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public void disabledInit() {} | ||||
|  | ||||
|   @Override | ||||
|   public void disabledPeriodic() {} | ||||
|  | ||||
|   @Override | ||||
|   public void disabledExit() {} | ||||
|  | ||||
|   @Override | ||||
|   public void autonomousInit() { | ||||
|     m_autonomousCommand = m_robotContainer.getAutonomousCommand(); | ||||
|  | ||||
|     if (m_autonomousCommand != null) { | ||||
|       m_autonomousCommand.schedule(); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public void autonomousPeriodic() {} | ||||
|  | ||||
|   @Override | ||||
|   public void autonomousExit() {} | ||||
|  | ||||
|   @Override | ||||
|   public void teleopInit() { | ||||
|     if (m_autonomousCommand != null) { | ||||
|       m_autonomousCommand.cancel(); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public void teleopPeriodic() {} | ||||
|  | ||||
|   @Override | ||||
|   public void teleopExit() {} | ||||
|  | ||||
|   @Override | ||||
|   public void testInit() { | ||||
|     CommandScheduler.getInstance().cancelAll(); | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public void testPeriodic() {} | ||||
|  | ||||
|   @Override | ||||
|   public void testExit() {} | ||||
| } | ||||
							
								
								
									
										20
									
								
								src/main/java/frc/robot/RobotContainer.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/main/java/frc/robot/RobotContainer.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| // Copyright (c) FIRST and other WPILib contributors. | ||||
| // 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. | ||||
|  | ||||
| package frc.robot; | ||||
|  | ||||
| import edu.wpi.first.wpilibj2.command.Command; | ||||
| import edu.wpi.first.wpilibj2.command.Commands; | ||||
|  | ||||
| public class RobotContainer { | ||||
|   public RobotContainer() { | ||||
|     configureBindings(); | ||||
|   } | ||||
|  | ||||
|   private void configureBindings() {} | ||||
|  | ||||
|   public Command getAutonomousCommand() { | ||||
|     return Commands.print("No autonomous command configured"); | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user