Merge "Adds the Trigger template and adds WPILib.h import to all templates"

This commit is contained in:
Thomas Clark (WPI)
2014-08-12 12:33:46 -07:00
committed by Gerrit Code Review
8 changed files with 24 additions and 21 deletions

View File

@@ -2,6 +2,7 @@
#define $classname_H
#include "../CommandBase.h"
#include "WPILib.h"
class $classname: public CommandBase
{

View File

@@ -5,6 +5,7 @@
#include "Commands/Command.h"
#include "Subsystems/ExampleSubsystem.h"
#include "OI.h"
#include "WPILib.h"
/**
* The base for all commands. All atomic commands should subclass CommandBase.

View File

@@ -2,6 +2,7 @@
#define $classname_H
#include "Commands/CommandGroup.h"
#include "WPILib.h"
class $classname: public CommandGroup
{

View File

@@ -2,6 +2,7 @@
#define EXAMPLE_COMMAND_H
#include "../CommandBase.h"
#include "WPILib.h"
class ExampleCommand: public CommandBase
{

View File

@@ -3,9 +3,6 @@
#include "SmartDashboard/SmartDashboard.h"
#include "LiveWindow/LiveWindow.h"
#@autogenerated_code("pid", "")
#parse("${exporter-path}PIDSubsystem-pid.cpp")
#end
$classname::$classname() :
PIDSubsystem("$classname", 1.0, 0.0, 0.0)
{

View File

@@ -1,6 +1,7 @@
#ifndef ROBOTMAP_H
#define ROBOTMAP_H
#include "WPILib.h"
/**
* The RobotMap is a mapping from the ports sensors and actuators are wired into

View File

@@ -1,15 +1,12 @@
// TODO: convert into C++ template
#error "This is not a C++ file. I have no idea what this is doing here, so I'm leaving this message here to let someone else clean this up"
import edu.wpi.first.wpilibj.command.Trigger;
#include "$classname.h"
/**
* New and improved C++
*/
public class $classname extends Trigger
$classname::$classname()
{
public:
bool get()
{
return false;
}
}
bool $classname::Get()
{
return false;
}

View File

@@ -1,9 +1,13 @@
// TODO: convert into C++ template
#error "This is not a C++ file. I have no idea what this is doing here, so I'm leaving this message here to let someone else clean this up"
import edu.wpi.first.wpilibj.command.Trigger;
#ifndef $classname_H
#define $classname_H
public class $classname extends Trigger
#include "WPILib.h"
class $classname: public Trigger
{
public:
bool get();
}
$classname();
bool Get();
};
#endif