Add templates for new commands for vscode plugin (#2016)

This commit is contained in:
Oblarg
2019-12-29 16:02:49 -05:00
committed by Peter Johnson
parent 6ea13ea8f3
commit 5b7dd186d2
45 changed files with 1354 additions and 35 deletions

View File

@@ -0,0 +1,24 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 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 "ReplaceMeCommand2.h"
ReplaceMeCommand2::ReplaceMeCommand2() {
// Use addRequirements() here to declare subsystem dependencies.
}
// Called when the command is initially scheduled.
void ReplaceMeCommand2::Initialize() {}
// Called repeatedly when this Command is scheduled to run
void ReplaceMeCommand2::Execute() {}
// Called once the command ends or is interrupted.
void ReplaceMeCommand2::End(bool interrupted) {}
// Returns true when the command should end.
bool ReplaceMeCommand2::IsFinished() { return false; }

View File

@@ -0,0 +1,32 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 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 <frc2/command/CommandBase.h>
#include <frc2/command/CommandHelper.h>
/**
* An example command.
*
* <p>Note that this extends CommandHelper, rather extending CommandBase
* directly; this is crucially important, or else the decorator functions in
* Command will *not* work!
*/
class ReplaceMeCommand2
: public frc2::CommandHelper<frc2::CommandBase, ReplaceMeCommand2> {
public:
ReplaceMeCommand2();
void Initialize() override;
void Execute() override;
void End(bool interrupted) override;
bool IsFinished() override;
};