mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 09:50:34 +08:00
6f5efbeab5
Send battery status (ghst_telemetry). Apply factors to show correct values of volts, amps and mAh. Change ghost protocol code to follow more MISRA C++ guidelines.
30 lines
555 B
C
30 lines
555 B
C
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "crsf.h"
|
|
#include "dsm.h"
|
|
#include "ghst.hpp"
|
|
#include "sbus.h"
|
|
#include "st24.h"
|
|
#include "sumd.h"
|
|
|
|
#pragma pack(push, 1)
|
|
typedef struct rc_decode_buf_ {
|
|
union {
|
|
crsf_frame_t crsf_frame;
|
|
ghst_frame_t ghst_frame;
|
|
dsm_decode_t dsm;
|
|
sbus_frame_t sbus_frame;
|
|
ReceiverFcPacket _strxpacket;
|
|
ReceiverFcPacketHoTT _hottrxpacket;
|
|
};
|
|
} rc_decode_buf_t;
|
|
#pragma pack(pop)
|
|
|
|
extern rc_decode_buf_t rc_decode_buf;
|
|
|
|
uint8_t crc8_dvb_s2(uint8_t crc, uint8_t a);
|
|
uint8_t crc8_dvb_s2_buf(uint8_t *buf, int len);
|