Add wpilibc and wpilibj skeleton templates (#1441)

See also vscode-wpilib#132.
This commit is contained in:
Jaci Brunning
2018-11-30 14:15:17 +08:00
committed by Peter Johnson
parent c405188052
commit 90572a3cc5
6 changed files with 147 additions and 0 deletions

View File

@@ -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",

View File

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

View File

@@ -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;
};