mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add wpilibc and wpilibj skeleton templates (#1441)
See also vscode-wpilib#132.
This commit is contained in:
committed by
Peter Johnson
parent
c405188052
commit
90572a3cc5
@@ -17,6 +17,15 @@
|
||||
"foldername": "timed",
|
||||
"gradlebase": "cpp"
|
||||
},
|
||||
{
|
||||
"name": "Timed Skeleton (Advanced)",
|
||||
"description": "Skeleton (stub) code for TimedRobot",
|
||||
"tags": [
|
||||
"Timed", "Skeleton"
|
||||
],
|
||||
"foldername": "timedskeleton",
|
||||
"gradlebase": "cpp"
|
||||
},
|
||||
{
|
||||
"name": "Command Robot",
|
||||
"description": "Command style",
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* 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. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "Robot.h"
|
||||
|
||||
void Robot::RobotInit() {}
|
||||
|
||||
void Robot::AutonomousInit() {}
|
||||
void Robot::AutonomousPeriodic() {}
|
||||
|
||||
void Robot::TeleopInit() {}
|
||||
void Robot::TeleopPeriodic() {}
|
||||
|
||||
void Robot::TestInit() {}
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* 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. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/TimedRobot.h>
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
void RobotInit() override;
|
||||
|
||||
void AutonomousInit() override;
|
||||
void AutonomousPeriodic() override;
|
||||
|
||||
void TeleopInit() override;
|
||||
void TeleopPeriodic() override;
|
||||
|
||||
void TestInit() override;
|
||||
void TestPeriodic() override;
|
||||
};
|
||||
Reference in New Issue
Block a user