Ghost protocol

ghst: add ghost protocol
This commit is contained in:
jciberlin
2021-02-20 11:29:57 +01:00
committed by Lorenz Meier
parent 711a69854b
commit 64342f568d
12 changed files with 781 additions and 32 deletions
+8 -3
View File
@@ -41,6 +41,7 @@
#include <drivers/drv_rc_input.h>
#include <lib/perf/perf_counter.h>
#include <lib/rc/crsf.h>
#include <lib/rc/ghst.h>
#include <lib/rc/dsm.h>
#include <lib/rc/sbus.h>
#include <lib/rc/st24.h>
@@ -60,6 +61,7 @@
#include <uORB/topics/vehicle_command.h>
#include "crsf_telemetry.h"
#include "ghst_telemetry.h"
#ifdef HRT_PPM_CHANNEL
# include <systemlib/ppm_decode.h>
@@ -94,16 +96,18 @@ private:
RC_SCAN_DSM,
RC_SCAN_SUMD,
RC_SCAN_ST24,
RC_SCAN_CRSF
RC_SCAN_CRSF,
RC_SCAN_GHST
} _rc_scan_state{RC_SCAN_SBUS};
static constexpr char const *RC_SCAN_STRING[6] {
static constexpr char const *RC_SCAN_STRING[7] {
"PPM",
"SBUS",
"DSM",
"SUMD",
"ST24",
"CRSF"
"CRSF",
"GHST"
};
void Run() override;
@@ -159,6 +163,7 @@ private:
uint16_t _raw_rc_count{};
CRSFTelemetry *_crsf_telemetry{nullptr};
GHSTTelemetry *_ghst_telemetry{nullptr};
perf_counter_t _cycle_perf;
perf_counter_t _publish_interval_perf;