WPILibC++
unspecified
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
Button.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) FIRST 2011-2016. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in the root directory of */
5
/* the project. */
6
/*----------------------------------------------------------------------------*/
7
8
#pragma once
9
10
#include "Buttons/Trigger.h"
11
#include "Commands/Command.h"
12
13
namespace
frc {
14
27
class
Button
:
public
Trigger
{
28
public
:
29
virtual
void
WhenPressed
(
Command
* command);
30
virtual
void
WhileHeld
(
Command
* command);
31
virtual
void
WhenReleased
(
Command
* command);
32
virtual
void
CancelWhenPressed
(
Command
* command);
33
virtual
void
ToggleWhenPressed
(
Command
* command);
34
};
35
36
}
// namespace frc
frc::Button::ToggleWhenPressed
virtual void ToggleWhenPressed(Command *command)
Toggle the specified command when the button is pressed.
Definition:
Button.cpp:50
frc::Button
This class provides an easy way to link commands to OI inputs.
Definition:
Button.h:27
frc::Button::WhenPressed
virtual void WhenPressed(Command *command)
Specifies the command to run when a button is first pressed.
Definition:
Button.cpp:17
frc::Button::WhenReleased
virtual void WhenReleased(Command *command)
Specifies the command to run when the button is released.
Definition:
Button.cpp:36
frc::Button::WhileHeld
virtual void WhileHeld(Command *command)
Specifies the command to be scheduled while the button is pressed.
Definition:
Button.cpp:27
frc::Button::CancelWhenPressed
virtual void CancelWhenPressed(Command *command)
Cancels the specificed command when the button is pressed.
Definition:
Button.cpp:43
frc::Command
The Command class is at the very core of the entire command framework.
Definition:
Command.h:52
frc::Trigger
This class provides an easy way to link commands to inputs.
Definition:
Trigger.h:34
shared
include
Buttons
Button.h
Generated on Fri Dec 16 2016 02:56:43 for WPILibC++ by
1.8.6