Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
actuators_ostrich.c File Reference
#include "modules/actuators/actuators_ostrich.h"
#include "mcu_periph/uart.h"
#include "generated/airframe.h"
+ Include dependency graph for actuators_ostrich.c:

Go to the source code of this file.

Data Structures

struct  SpeedMessagePayload
 
union  rawData
 
struct  SpeedMessage
 
union  RawMessage
 

Macros

#define SPEED_NEUTRAL   500
 
#define SPEED_FACTOR   1.0
 
#define TURN_NEUTRAL   500
 
#define TURN_FACTOR   0.5
 
#define SPEED_OF_CMD(_s)   ((_s-SPEED_NEUTRAL)*SPEED_FACTOR)
 
#define TURN_OF_CMD(_w)   ((_w-TURN_NEUTRAL)*TURN_FACTOR)
 
#define START_BYTE   0x7F
 

Functions

static uint16_t speed_cmd_to_msg (uint16_t speed_cmd)
 
static uint16_t turn_cmd_to_msg (uint16_t turn_cmd)
 
static uint8_t compute_checksum (uint8_t bytes[], int len)
 
void actuators_ostrich_init ()
 
void actuators_ostrich_periodic ()
 

Variables

struct ActuatorsOstrich actuators_ostrich
 
static struct uart_periphostrich_dev
 

Detailed Description

Author
Fabien Bonneval Driver for the Ostrich rover controller board

Definition in file actuators_ostrich.c.


Data Structure Documentation

struct SpeedMessagePayload

Definition at line 42 of file actuators_ostrich.c.

Data Fields
uint16_t vtheta
uint16_t vx
uint16_t vy
union rawData

Definition at line 48 of file actuators_ostrich.c.

+ Collaboration diagram for rawData:
Data Fields
uint8_t bytes[6]
struct SpeedMessagePayload data
struct SpeedMessage

Definition at line 53 of file actuators_ostrich.c.

+ Collaboration diagram for SpeedMessage:
Data Fields
uint8_t checksum
uint8_t msg_type
union rawData raw_data
uint8_t start_byte
union RawMessage

Definition at line 60 of file actuators_ostrich.c.

+ Collaboration diagram for RawMessage:
Data Fields
uint8_t bytes[9]
struct SpeedMessage speed_message

Macro Definition Documentation

#define SPEED_FACTOR   1.0

Definition at line 31 of file actuators_ostrich.c.

#define SPEED_NEUTRAL   500

Definition at line 30 of file actuators_ostrich.c.

Referenced by actuators_ostrich_init().

#define SPEED_OF_CMD (   _s)    ((_s-SPEED_NEUTRAL)*SPEED_FACTOR)

Definition at line 35 of file actuators_ostrich.c.

Referenced by speed_cmd_to_msg().

#define START_BYTE   0x7F

Definition at line 40 of file actuators_ostrich.c.

Referenced by actuators_ostrich_periodic().

#define TURN_FACTOR   0.5

Definition at line 33 of file actuators_ostrich.c.

#define TURN_NEUTRAL   500

Definition at line 32 of file actuators_ostrich.c.

Referenced by actuators_ostrich_init().

#define TURN_OF_CMD (   _w)    ((_w-TURN_NEUTRAL)*TURN_FACTOR)

Definition at line 36 of file actuators_ostrich.c.

Referenced by turn_cmd_to_msg().

Function Documentation

void actuators_ostrich_init ( void  )
static uint8_t compute_checksum ( uint8_t  bytes[],
int  len 
)
static

Definition at line 78 of file actuators_ostrich.c.

References checksum.

Referenced by actuators_ostrich_periodic().

+ Here is the caller graph for this function:

static uint16_t speed_cmd_to_msg ( uint16_t  speed_cmd)
static

Definition at line 68 of file actuators_ostrich.c.

References SPEED_OF_CMD.

Referenced by actuators_ostrich_periodic().

+ Here is the caller graph for this function:

static uint16_t turn_cmd_to_msg ( uint16_t  turn_cmd)
static

Definition at line 73 of file actuators_ostrich.c.

References TURN_OF_CMD.

Referenced by actuators_ostrich_periodic().

+ Here is the caller graph for this function:

Variable Documentation

struct ActuatorsOstrich actuators_ostrich

Definition at line 38 of file actuators_ostrich.c.

Referenced by actuators_ostrich_init(), and actuators_ostrich_periodic().

struct uart_periph* ostrich_dev
static

Definition at line 66 of file actuators_ostrich.c.