![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
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"
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. | |
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/.
Definition in file actuators_t4_uart.c.
|
static |
Definition at line 58 of file actuators_t4_uart.c.
References actuators_t4_in, actuators_t4_message_frequency_in, actuators_t4_missed_packets_in, ActuatorsT4In::bitmask_servo_health, dev, ActuatorsT4In::esc_1_current, ActuatorsT4In::esc_1_error_code, ActuatorsT4In::esc_1_rpm, ActuatorsT4In::esc_1_voltage, ActuatorsT4In::esc_2_current, ActuatorsT4In::esc_2_error_code, ActuatorsT4In::esc_2_rpm, ActuatorsT4In::esc_2_voltage, ActuatorsT4In::esc_3_current, ActuatorsT4In::esc_3_error_code, ActuatorsT4In::esc_3_rpm, ActuatorsT4In::esc_3_voltage, ActuatorsT4In::esc_4_current, ActuatorsT4In::esc_4_error_code, ActuatorsT4In::esc_4_rpm, ActuatorsT4In::esc_4_voltage, foo, ActuatorsT4In::rolling_msg_in, ActuatorsT4In::rolling_msg_in_id, ActuatorsT4In::servo_10_angle, ActuatorsT4In::servo_10_load, ActuatorsT4In::servo_11_angle, ActuatorsT4In::servo_12_angle, ActuatorsT4In::servo_1_angle, ActuatorsT4In::servo_1_load, ActuatorsT4In::servo_2_angle, ActuatorsT4In::servo_2_load, ActuatorsT4In::servo_3_angle, ActuatorsT4In::servo_3_load, ActuatorsT4In::servo_4_angle, ActuatorsT4In::servo_4_load, ActuatorsT4In::servo_5_angle, ActuatorsT4In::servo_5_load, ActuatorsT4In::servo_6_angle, ActuatorsT4In::servo_6_load, ActuatorsT4In::servo_7_angle, ActuatorsT4In::servo_7_load, ActuatorsT4In::servo_8_angle, ActuatorsT4In::servo_8_load, ActuatorsT4In::servo_9_angle, and ActuatorsT4In::servo_9_load.
Referenced by actuators_t4_uart_init().
Definition at line 226 of file actuators_t4_uart.c.
References actuators_t4_buf_in_cnt, actuators_t4_last_ts, actuators_t4_message_frequency_in, actuators_t4_missed_packets_in, actuators_t4_msg_buf_in, actuators_t4_received_packets, actuators_t4_uart_parse_msg_in(), foo, get_sys_time_float(), START_BYTE_ACTUATORS_T4, uart_char_available(), and uart_getch().
Definition at line 201 of file actuators_t4_uart.c.
References ABI_BROADCAST, actuators_t4_buf_in_cnt, actuators_t4_downlink(), ACTUATORS_T4_OUT, actuators_t4_out_msg_id, actuators_t4_uplink(), data_actuators_t4_out(), DefaultPeriodic, foo, and register_periodic_telemetry().
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().
|
static |
Definition at line 129 of file actuators_t4_uart.c.
References actuators_t4_out, dev, ActuatorsT4Out::esc_1_dshot_cmd, ActuatorsT4Out::esc_2_dshot_cmd, ActuatorsT4Out::esc_3_dshot_cmd, ActuatorsT4Out::esc_4_dshot_cmd, ActuatorsT4Out::esc_arm, foo, ActuatorsT4Out::rolling_msg_out, ActuatorsT4Out::rolling_msg_out_id, ActuatorsT4Out::servo_10_cmd, ActuatorsT4Out::servo_11_cmd, ActuatorsT4Out::servo_12_cmd, ActuatorsT4Out::servo_1_cmd, ActuatorsT4Out::servo_2_cmd, ActuatorsT4Out::servo_3_cmd, ActuatorsT4Out::servo_4_cmd, ActuatorsT4Out::servo_5_cmd, ActuatorsT4Out::servo_6_cmd, ActuatorsT4Out::servo_7_cmd, ActuatorsT4Out::servo_8_cmd, ActuatorsT4Out::servo_9_cmd, and ActuatorsT4Out::servo_arm.
Referenced by actuators_t4_uart_init().
|
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().
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().
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().
float actuators_t4_extra_data_out[255] |
Definition at line 39 of file actuators_t4_uart.c.
Referenced by data_actuators_t4_out().
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().
float actuators_t4_last_ts = 0 |
Definition at line 49 of file actuators_t4_uart.c.
Referenced by actuators_t4_uart_event().
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().
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().
|
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().
|
static |
Definition at line 36 of file actuators_t4_uart.c.
Referenced by actuators_t4_uart_init().
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().
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().
uint32_t actuators_t4_received_packets = 0 |
Definition at line 47 of file actuators_t4_uart.c.
Referenced by actuators_t4_uart_event().