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
9
10namespace okapi {
11class 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
virtual bool controllerGet() override
Get the sensor value for use in a control loop.
virtual bool changed()=0
Return whether the state of the button changed since the last time this method was called.
virtual bool changedToPressed()=0
Return whether the state of the button changed to being pressed since the last time this method was c...
virtual bool changedToReleased()=0
Return whether the state of the button to being not pressed changed since the last time this method w...
virtual bool isPressed()=0
Return whether the button is currently pressed.