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