TechTheTime-HighLevel 0.0.1
The high level robot's code using ros2-foxy for the robotics competition(Erobot-2022)
joystick.hpp File Reference
#include <string>
#include <iostream>

Go to the source code of this file.

Classes

class  Joystick
 Represents a joystick device. More...
 
class  JoystickEvent
 Encapsulates all data relevant to a sampled joystick event. More...
 

Macros

#define JS_EVENT_AXIS   0x02
 
#define JS_EVENT_BUTTON   0x01
 
#define JS_EVENT_INIT   0x80
 

Functions

std::ostream & operator<< (std::ostream &os, const JoystickEvent &e)
 Stream insertion function so you can do this: cout << event << endl;. More...
 

Macro Definition Documentation

◆ JS_EVENT_AXIS

#define JS_EVENT_AXIS   0x02

◆ JS_EVENT_BUTTON

#define JS_EVENT_BUTTON   0x01

◆ JS_EVENT_INIT

#define JS_EVENT_INIT   0x80

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const JoystickEvent e 
)

Stream insertion function so you can do this: cout << event << endl;.

The ostream inserter needs to be a friend so it can access the internal data structures.