WPILibC++  2019.1.1-beta-2-5-g55493b0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
POVButton.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2018 FIRST. 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 "frc/GenericHID.h"
11 #include "frc/buttons/Button.h"
12 
13 namespace frc {
14 class POVButton : public Button {
15  public:
23  POVButton(GenericHID& joystick, int angle, int povNumber = 0);
24  virtual ~POVButton() = default;
25 
26  POVButton(POVButton&&) = default;
27  POVButton& operator=(POVButton&&) = default;
28 
29  bool Get() override;
30 
31  private:
32  GenericHID* m_joystick;
33  int m_angle;
34  int m_povNumber;
35 };
36 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
Definition: POVButton.h:14
This class provides an easy way to link commands to OI inputs.
Definition: Button.h:26
POVButton(GenericHID &joystick, int angle, int povNumber=0)
Creates a POV button for triggering commands.
GenericHID Interface.
Definition: GenericHID.h:23