mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Merge "Adds the Trigger template and adds WPILib.h import to all templates"
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define $classname_H
|
||||
|
||||
#include "../CommandBase.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
class $classname: public CommandBase
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define $classname_H
|
||||
|
||||
#include "Commands/CommandGroup.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
class $classname: public CommandGroup
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define EXAMPLE_COMMAND_H
|
||||
|
||||
#include "../CommandBase.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
class ExampleCommand: public CommandBase
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user