28 #include "generated/airframe.h"
30 #define SPEED_NEUTRAL 500
31 #define SPEED_FACTOR 1.0
32 #define TURN_NEUTRAL 500
33 #define TURN_FACTOR 0.5
35 #define SPEED_OF_CMD(_s) ((_s-SPEED_NEUTRAL)*SPEED_FACTOR)
36 #define TURN_OF_CMD(_w) ((_w-TURN_NEUTRAL)*TURN_FACTOR)
40 #define START_BYTE 0x7F
46 } __attribute__((packed)) ;
51 } __attribute__((packed)) ;
58 } __attribute__((packed)) ;
63 } __attribute__((packed)) ;
81 for (
int i = 0; i < len; i++) {
90 ostrich_dev = &(ACTUATORS_OSTRICH_DEV);
struct SpeedMessage speed_message
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
static struct uart_periph * ostrich_dev
static uint16_t turn_cmd_to_msg(uint16_t turn_cmd)
void uart_put_buffer(struct uart_periph *p, long fd, const uint8_t *data, uint16_t len)
Uart transmit buffer implementation.
static uint8_t compute_checksum(uint8_t bytes[], int len)
void actuators_ostrich_periodic()
static uint16_t speed_cmd_to_msg(uint16_t speed_cmd)
void actuators_ostrich_init()
struct SpeedMessagePayload data
struct ActuatorsOstrich actuators_ostrich