Instrument Neutral Distributed Interface INDI  2.0.2
Classes | Macros
joystickdriver.h File Reference
#include <iostream>
#include <functional>
#include <fcntl.h>
#include <pthread.h>
#include <cmath>
#include <linux/joystick.h>
#include <vector>
#include <unistd.h>

Go to the source code of this file.

Classes

struct  joystick_position
 
struct  joystick_state
 
class  JoyStickDriver
 The JoyStickDriver class provides basic functionality to read events from supported game pads under Linux. It provides functions to read the button, axis, and joystick status and values. By definition, a joystick is the combination of two axis. A game pad may have one or more joysticks depending on the number of reported axis. You can utilize the class in an event driven fashion by using callbacks. The callbacks have a specific signature and must be set. Alternatively, you may query the status and position of the buttons & axis at any time as well. More...
 

Macros

#define JOYSTICK_DEV   "/dev/input/js0"
 

Macro Definition Documentation

◆ JOYSTICK_DEV

#define JOYSTICK_DEV   "/dev/input/js0"

Definition at line 36 of file joystickdriver.h.