Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
joystick.h
Go to the documentation of this file.
1 #ifndef JOYSTICK_H
2 #define JOYSTICK_H
3 
4 #include "std.h"
6 #include "autopilot.h"
7 
9 
10 #define JoystickHandeDatalink(_roll_int8, _pitch_int8, _throttle_int8) { \
11  if (pprz_mode == PPRZ_MODE_AUTO2 && nav_block == joystick_block) { \
12  h_ctl_roll_setpoint = _roll_int8 * (AUTO1_MAX_ROLL / 0x7f); \
13  h_ctl_pitch_setpoint = _pitch_int8 * (AUTO1_MAX_PITCH / 0x7f); \
14  v_ctl_throttle_setpoint = (MAX_PPRZ/0x7f) * _throttle_int8; \
15  } \
16 }
17 
18 
19 
20 #endif /* JOYSTICK_H */
uint8_t joystick_block
Definition: joystick.c:3
unsigned char uint8_t
Definition: types.h:14