48 #include <px4_platform_common/defines.h> 52 #define CRSF_FRAME_SIZE_MAX 30 // the actual maximum length is 64, but we're only interested in RC channels and want to minimize buffer size 53 #define CRSF_PAYLOAD_SIZE_MAX (CRSF_FRAME_SIZE_MAX-4) 86 __EXPORT bool crsf_parse(
const uint64_t now,
const uint8_t *frame,
unsigned len, uint16_t *values,
87 uint16_t *num_values, uint16_t max_channels);
113 uint16_t gps_heading, uint16_t altitude, uint8_t num_satellites);
__EXPORT bool crsf_send_telemetry_flight_mode(int uart_fd, const char *flight_mode)
Send telemetry Flight Mode information.
__EXPORT int crsf_config(int uart_fd)
Configure an UART port to be used for CRSF.
__EXPORT bool crsf_send_telemetry_gps(int uart_fd, int32_t latitude, int32_t longitude, uint16_t groundspeed, uint16_t gps_heading, uint16_t altitude, uint8_t num_satellites)
Send telemetry GPS information.
__EXPORT bool crsf_send_telemetry_attitude(int uart_fd, int16_t pitch, int16_t roll, int16_t yaw)
Send telemetry Attitude information.
__EXPORT bool crsf_parse(const uint64_t now, const uint8_t *frame, unsigned len, uint16_t *values, uint16_t *num_values, uint16_t max_channels)
Parse the CRSF protocol and extract RC channel data.
crsf_frame_header_t header
__EXPORT bool crsf_send_telemetry_battery(int uart_fd, uint16_t voltage, uint16_t current, int fuel, uint8_t remaining)
Send telemetry battery information.
#define CRSF_PAYLOAD_SIZE_MAX