MAV'RIC
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
Joystick Class Reference
Collaboration diagram for Joystick:
Collaboration graph
[legend]

List of all members.

Classes

union  button_t
 The union structure for the bit mask of the joystick buttons. More...
struct  channels_t
 Joystick Channels. More...
struct  conf_t
 Configuration for joystick. More...

Public Types

enum  button_pressed_t { BUTTON_UNPRESSED = 0, BUTTON_PRESSED = 1 }
 button enumeration
enum  throttle_mode_t { ZERO_CENTER = 0, ZERO_DOWN }

Public Member Functions

 Joystick (conf_t conf=default_config())
 Constructor.
float throttle () const
 Returns the throttle value from the joystick.
float roll () const
 Returns the roll value from the joystick.
float pitch () const
 Returns the pitch value from the joystick.
float yaw () const
 Returns the yaw value from the joystick.
Mav_mode get_mode (const Mav_mode current_mode)
 Returns the current desired mode value from the joystick.
void button_update (uint16_t buttons)
 Do operations when buttons are pressed.

Static Public Member Functions

static conf_t default_config ()
 Default config for joystick.

Public Attributes

button_t buttons_
 The bit mask of the button pressed.
channels_t channels_
 Channels of the joystick.
Mav_mode mav_mode_desired_
 The mav mode indicated by the remote.

Member Function Documentation

void Joystick::button_update ( uint16_t  buttons)

Do operations when buttons are pressed.

Parameters:
buttonsThe bit mask of the buttons

Here is the call graph for this function:

Mav_mode Joystick::get_mode ( const Mav_mode  current_mode)

Returns the current desired mode value from the joystick.

Returns:
The value of the current desired mode

Here is the call graph for this function:

Here is the caller graph for this function:

float Joystick::pitch ( ) const

Returns the pitch value from the joystick.

Returns:
The value of the pitch

Here is the caller graph for this function:

float Joystick::roll ( ) const

Returns the roll value from the joystick.

Returns:
The value of the roll

Here is the caller graph for this function:

float Joystick::throttle ( ) const

Returns the throttle value from the joystick.

Returns:
The value of the throttle

Here is the caller graph for this function:

float Joystick::yaw ( ) const

Returns the yaw value from the joystick.

Returns:
The value of the yaw

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines