Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
actuators_t4_uart.c File Reference

Uses a T4 Actuators Board as fly by wire system. This Board can control serial bus servos, ESC's and PWM servos, with as big benefir providing real time telemetry in return into the autopilot state. Read more on how to create your own T4 Board here: https://github.com/tudelft/t4_actuators_board/. More...

#include "pprzlink/pprz_transport.h"
#include "mcu_periph/uart.h"
#include "mcu_periph/sys_time.h"
#include <time.h>
#include <sys/time.h>
#include "modules/core/abi.h"
#include "modules/actuators/actuators_t4_uart.h"
#include "modules/datalink/telemetry.h"
+ Include dependency graph for actuators_t4_uart.c:

Go to the source code of this file.

Functions

static void actuators_t4_downlink (struct transport_tx *trans, struct link_device *dev)
 
static void actuators_t4_uplink (struct transport_tx *trans, struct link_device *dev)
 
static void data_actuators_t4_out (uint8_t sender_id, struct ActuatorsT4Out *actuators_t4_out_ptr, float *actuators_t4_extra_data_out_ptr)
 
void actuators_t4_uart_init ()
 
void actuators_t4_uart_parse_msg_in (void)
 
void actuators_t4_uart_event ()
 

Variables

static abi_event ACTUATORS_T4_OUT
 
uint8_t actuators_t4_out_msg_id
 
struct ActuatorsT4Out actuators_t4_out
 
float actuators_t4_extra_data_out [255]
 
struct ActuatorsT4In actuators_t4_in
 
float actuators_t4_extra_data_in [255]
 
uint16_t actuators_t4_buf_in_cnt = 0
 
uint32_t actuators_t4_missed_packets_in = 0
 
uint32_t actuators_t4_received_packets = 0
 
uint16_t actuators_t4_message_frequency_in = 0
 
float actuators_t4_last_ts = 0
 
static uint8_t actuators_t4_msg_buf_in [sizeof(struct ActuatorsT4In) *2]
 The message buffer for the device chosen to be 2* message_size total.
 

Detailed Description

Uses a T4 Actuators Board as fly by wire system. This Board can control serial bus servos, ESC's and PWM servos, with as big benefir providing real time telemetry in return into the autopilot state. Read more on how to create your own T4 Board here: https://github.com/tudelft/t4_actuators_board/.

Author
Alessandro Mancinelli, Sunyou Hwang, OpenUAS

Definition in file actuators_t4_uart.c.

Function Documentation

◆ actuators_t4_downlink()

static void actuators_t4_downlink ( struct transport_tx trans,
struct link_device dev 
)
static

◆ actuators_t4_uart_event()

◆ actuators_t4_uart_init()

◆ actuators_t4_uart_parse_msg_in()

void actuators_t4_uart_parse_msg_in ( void  )

Definition at line 216 of file actuators_t4_uart.c.

References actuators_t4_extra_data_in, actuators_t4_in, actuators_t4_msg_buf_in, foo, ActuatorsT4In::rolling_msg_in, and ActuatorsT4In::rolling_msg_in_id.

Referenced by actuators_t4_uart_event().

+ Here is the caller graph for this function:

◆ actuators_t4_uplink()

◆ data_actuators_t4_out()

static void data_actuators_t4_out ( uint8_t  sender_id,
struct ActuatorsT4Out actuators_t4_out_ptr,
float actuators_t4_extra_data_out_ptr 
)
static

Definition at line 166 of file actuators_t4_uart.c.

References actuators_t4_extra_data_out, actuators_t4_out, actuators_t4_out_msg_id, ActuatorsT4Out::checksum_out, foo, ActuatorsT4Out::rolling_msg_out, ActuatorsT4Out::rolling_msg_out_id, START_BYTE_ACTUATORS_T4, and uart_put_byte().

Referenced by actuators_t4_uart_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ actuators_t4_buf_in_cnt

uint16_t actuators_t4_buf_in_cnt = 0

Definition at line 45 of file actuators_t4_uart.c.

Referenced by actuators_t4_uart_event(), and actuators_t4_uart_init().

◆ actuators_t4_extra_data_in

float actuators_t4_extra_data_in[255]

Definition at line 43 of file actuators_t4_uart.c.

Referenced by actuators_t4_uart_parse_msg_in().

◆ actuators_t4_extra_data_out

float actuators_t4_extra_data_out[255]

Definition at line 39 of file actuators_t4_uart.c.

Referenced by data_actuators_t4_out().

◆ actuators_t4_in

struct ActuatorsT4In actuators_t4_in

Definition at line 42 of file actuators_t4_uart.c.

Referenced by actuators_t4_downlink(), and actuators_t4_uart_parse_msg_in().

◆ actuators_t4_last_ts

float actuators_t4_last_ts = 0

Definition at line 49 of file actuators_t4_uart.c.

Referenced by actuators_t4_uart_event().

◆ actuators_t4_message_frequency_in

uint16_t actuators_t4_message_frequency_in = 0

Definition at line 48 of file actuators_t4_uart.c.

Referenced by actuators_t4_downlink(), and actuators_t4_uart_event().

◆ actuators_t4_missed_packets_in

uint32_t actuators_t4_missed_packets_in = 0

Definition at line 46 of file actuators_t4_uart.c.

Referenced by actuators_t4_downlink(), and actuators_t4_uart_event().

◆ actuators_t4_msg_buf_in

uint8_t actuators_t4_msg_buf_in[sizeof(struct ActuatorsT4In) *2]
static

The message buffer for the device chosen to be 2* message_size total.

Definition at line 51 of file actuators_t4_uart.c.

Referenced by actuators_t4_uart_event(), and actuators_t4_uart_parse_msg_in().

◆ ACTUATORS_T4_OUT

abi_event ACTUATORS_T4_OUT
static

Definition at line 36 of file actuators_t4_uart.c.

Referenced by actuators_t4_uart_init().

◆ actuators_t4_out

struct ActuatorsT4Out actuators_t4_out

Definition at line 38 of file actuators_t4_uart.c.

Referenced by actuators_t4_uplink(), and data_actuators_t4_out().

◆ actuators_t4_out_msg_id

uint8_t actuators_t4_out_msg_id

Definition at line 37 of file actuators_t4_uart.c.

Referenced by actuators_t4_uart_init(), and data_actuators_t4_out().

◆ actuators_t4_received_packets

uint32_t actuators_t4_received_packets = 0

Definition at line 47 of file actuators_t4_uart.c.

Referenced by actuators_t4_uart_event().