Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/actuators/actuators_ostrich.h"
#include "mcu_periph/uart.h"
#include "generated/airframe.h"
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_periph * | ostrich_dev |
Definition in file actuators_ostrich.c.
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.
Data Fields | ||
---|---|---|
uint8_t | bytes[6] | |
struct SpeedMessagePayload | data |
struct SpeedMessage |
union RawMessage |
Definition at line 60 of file actuators_ostrich.c.
Data Fields | ||
---|---|---|
uint8_t | bytes[9] | |
struct SpeedMessage | speed_message |
#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.
#define SPEED_OF_CMD | ( | _s | ) | ((_s-SPEED_NEUTRAL)*SPEED_FACTOR) |
Definition at line 35 of file actuators_ostrich.c.
#define START_BYTE 0x7F |
Definition at line 40 of file actuators_ostrich.c.
#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.
#define TURN_OF_CMD | ( | _w | ) | ((_w-TURN_NEUTRAL)*TURN_FACTOR) |
Definition at line 36 of file actuators_ostrich.c.
void actuators_ostrich_init | ( | void | ) |
Definition at line 88 of file actuators_ostrich.c.
References actuators_ostrich, ActuatorsOstrich::cmds, ostrich_dev, SPEED_NEUTRAL, and TURN_NEUTRAL.
void actuators_ostrich_periodic | ( | void | ) |
Definition at line 96 of file actuators_ostrich.c.
References actuators_ostrich, rawData::bytes, RawMessage::bytes, SpeedMessage::checksum, ActuatorsOstrich::cmds, compute_checksum(), rawData::data, SpeedMessage::msg_type, ostrich_dev, SpeedMessage::raw_data, speed_cmd_to_msg(), RawMessage::speed_message, START_BYTE, SpeedMessage::start_byte, turn_cmd_to_msg(), uart_put_buffer(), SpeedMessagePayload::vtheta, SpeedMessagePayload::vx, and SpeedMessagePayload::vy.
Definition at line 78 of file actuators_ostrich.c.
References checksum.
Referenced by actuators_ostrich_periodic().
Definition at line 68 of file actuators_ostrich.c.
References SPEED_OF_CMD.
Referenced by actuators_ostrich_periodic().
Definition at line 73 of file actuators_ostrich.c.
References TURN_OF_CMD.
Referenced by actuators_ostrich_periodic().
struct ActuatorsOstrich actuators_ostrich |
Definition at line 1 of file actuators_ostrich.c.
Referenced by actuators_ostrich_init(), and actuators_ostrich_periodic().
|
static |
Definition at line 66 of file actuators_ostrich.c.
Referenced by actuators_ostrich_init(), and actuators_ostrich_periodic().