23 #include "sensor_thread.h" 24 #include "acquisition_thread.h" 26 #include <interfaces/JoystickInterface.h> 42 :
Thread(
"JoystickSensorThread",
Thread::OPMODE_WAITFORWAKEUP),
71 __joystick_if->
write();
unsigned int pressed_buttons() const
Pressed buttons.
virtual void loop()
Code to execute in the thread.
JoystickInterface Fawkes BlackBoard Interface.
float * axis_values()
Get values for the axes.
Fawkes library namespace.
void set_pressed_buttons(const uint32_t new_pressed_buttons)
Set pressed_buttons value.
JoystickSensorThread(JoystickAcquisitionThread *aqt)
Constructor.
Thread class encapsulation of pthreads.
bool lock_if_new_data()
Lock data if fresh.
void write()
Write from local copy into BlackBoard memory.
Joystick acqusition thread for Linux joystick API.
void set_num_axes(const uint8_t new_num_axes)
Set num_axes value.
Thread aspect to use blocked timing.
virtual void init()
Initialize the thread.
char num_buttons() const
Get number of buttons.
virtual void finalize()
Finalize the thread.
void set_axis(unsigned int index, const float new_axis)
Set axis value at given index.
void unlock()
Unlock data.
char num_axes() const
Get number of axes.
virtual Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)=0
Open interface for writing.
void set_num_buttons(const uint8_t new_num_buttons)
Set num_buttons value.
BlackBoard * blackboard
This is the BlackBoard instance you can use to interact with the BlackBoard.
virtual void close(Interface *interface)=0
Close interface.