LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
abstractButton.hpp
Go to the documentation of this file.
1
/*
2
* This Source Code Form is subject to the terms of the Mozilla Public
3
* License, v. 2.0. If a copy of the MPL was not distributed with this
4
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
*/
6
#pragma once
7
8
#include "
okapi/api/control/controllerInput.hpp
"
9
10
namespace
okapi
{
11
class
AbstractButton
:
public
ControllerInput
<bool> {
12
public
:
13
virtual
~AbstractButton
();
14
18
virtual
bool
isPressed
() = 0;
19
24
virtual
bool
changed
() = 0;
25
30
virtual
bool
changedToPressed
() = 0;
31
36
virtual
bool
changedToReleased
() = 0;
37
44
virtual
bool
controllerGet
()
override
;
45
};
46
}
// namespace okapi
okapi::AbstractButton
Definition
abstractButton.hpp:11
okapi::AbstractButton::controllerGet
virtual bool controllerGet() override
Get the sensor value for use in a control loop.
okapi::AbstractButton::changed
virtual bool changed()=0
Return whether the state of the button changed since the last time this method was called.
okapi::AbstractButton::changedToPressed
virtual bool changedToPressed()=0
Return whether the state of the button changed to being pressed since the last time this method was c...
okapi::AbstractButton::~AbstractButton
virtual ~AbstractButton()
okapi::AbstractButton::changedToReleased
virtual bool changedToReleased()=0
Return whether the state of the button to being not pressed changed since the last time this method w...
okapi::AbstractButton::isPressed
virtual bool isPressed()=0
Return whether the button is currently pressed.
okapi::ControllerInput
Definition
controllerInput.hpp:9
controllerInput.hpp
okapi
Definition
chassisController.hpp:16
include
okapi
api
device
button
abstractButton.hpp
Generated by
1.9.8