BoB robotics
The Brains on Board robotics library
BoBRobotics::HID::JoystickDummy Class Reference
Inheritance diagram for BoBRobotics::HID::JoystickDummy:
BoBRobotics::HID::JoystickBase< JAxisDummy, JButtonDummy > BoBRobotics::Threadable

Public Member Functions

 JoystickDummy (float)
 
virtual bool updateState () override
 
- Public Member Functions inherited from BoBRobotics::HID::JoystickBase< JAxisDummy, JButtonDummy >
bool update ()
 Try to read from the joystick. More...
 
void addHandler (AxisHandler handler)
 Add a function to handle joystick axis events.
 
void addHandler (ButtonHandler handler)
 Add a function to handle joystick button events.
 
float getState (JAxisDummy axis) const
 Get the current value for a specified joystick axis.
 
unsigned char getState (JButtonDummy button) const
 Get the current state for a specified joystick button. More...
 
bool isDown (JButtonDummy button) const
 Whether button is currently being pressed.
 
bool isPressed (JButtonDummy button) const
 Whether button has been pressed since last update()
 
bool isReleased (JButtonDummy button) const
 Whether button has been released since last update()
 
- Public Member Functions inherited from BoBRobotics::Threadable
virtual void run ()
 Run on the current thread, blocking until process ends.
 
virtual bool isRunning ()
 Check if the run() function has been called.
 
virtual void runInBackground ()
 Run the process on a background thread.
 
virtual void stop ()
 Stop the background thread.
 

Additional Inherited Members

- Static Public Member Functions inherited from BoBRobotics::HID::JoystickBase< JAxisDummy, JButtonDummy >
static std::string getName (JAxisDummy axis)
 Get the name of a specified joystick axis.
 
static std::string getName (JButtonDummy button)
 Get the name of a specified joystick button.
 
- Protected Member Functions inherited from BoBRobotics::HID::JoystickBase< JAxisDummy, JButtonDummy >
 JoystickBase (float deadZone=0.0f)
 
virtual bool updateState ()=0
 
virtual void runInternal () override
 
void setPressed (JButtonDummy button, bool isInitial)
 
void setReleased (JButtonDummy button, bool isInitial)
 
void setState (JButtonDummy button, uint8_t state, bool isInitial)
 
void setState (JAxisDummy axis, float value, bool isInitial)
 
virtual void runInternal ()=0
 
- Static Protected Member Functions inherited from BoBRobotics::HID::JoystickBase< JAxisDummy, JButtonDummy >
static constexpr size_t toIndex (T value)
 
static constexpr JAxisDummy toAxis (T value)
 
static constexpr JButtonDummy toButton (T value)
 
static constexpr float int16_maxf ()
 
static constexpr float int16_absminf ()
 

Member Function Documentation

◆ updateState()

virtual bool BoBRobotics::HID::JoystickDummy::updateState ( )
inlineoverridevirtual

The documentation for this class was generated from the following file: