Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ SpeedMessagePayload

struct SpeedMessagePayload

Definition at line 42 of file actuators_ostrich.c.

Data Fields
uint16_t vtheta
uint16_t vx
uint16_t vy

◆ rawData

union rawData

Definition at line 48 of file actuators_ostrich.c.

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

◆ SpeedMessage

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

◆ RawMessage

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

◆ SPEED_FACTOR

#define SPEED_FACTOR   1.0

Definition at line 31 of file actuators_ostrich.c.

◆ SPEED_NEUTRAL

#define SPEED_NEUTRAL   500

Definition at line 30 of file actuators_ostrich.c.

◆ SPEED_OF_CMD

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

Definition at line 35 of file actuators_ostrich.c.

◆ START_BYTE

#define START_BYTE   0x7F

Definition at line 40 of file actuators_ostrich.c.

◆ TURN_FACTOR

#define TURN_FACTOR   0.5

Definition at line 33 of file actuators_ostrich.c.

◆ TURN_NEUTRAL

#define TURN_NEUTRAL   500

Definition at line 32 of file actuators_ostrich.c.

◆ TURN_OF_CMD

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

Definition at line 36 of file actuators_ostrich.c.

Function Documentation

◆ actuators_ostrich_init()

void actuators_ostrich_init ( void  )

◆ actuators_ostrich_periodic()

◆ compute_checksum()

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:

◆ speed_cmd_to_msg()

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:

◆ turn_cmd_to_msg()

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

◆ actuators_ostrich

struct ActuatorsOstrich actuators_ostrich

Definition at line 1 of file actuators_ostrich.c.

Referenced by actuators_ostrich_init(), and actuators_ostrich_periodic().

◆ ostrich_dev

struct uart_periph* ostrich_dev
static

Definition at line 66 of file actuators_ostrich.c.

Referenced by actuators_ostrich_init(), and actuators_ostrich_periodic().