1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

Merge pull request #9960 from phobos-/f4-dsmx

Spektrum SPI protocol improvements
This commit is contained in:
Michael Keller 2020-06-30 01:03:09 +12:00 committed by GitHub
commit 4abc447ffe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 135 additions and 87 deletions

View file

@ -44,12 +44,13 @@ extern "C" {
#define IS_DSMX(x) (!IS_DSM2(x))
typedef enum {
DSM_RECEIVER_BIND = 0x0,
DSM_RECEIVER_SYNC_A = 0x1,
DSM_RECEIVER_SYNC_B = 0x2,
DSM_RECEIVER_RECV = 0x3,
DSM_RECEIVER_BIND = 0,
DSM_RECEIVER_BIND2,
DSM_RECEIVER_SYNC_A,
DSM_RECEIVER_SYNC_B,
DSM_RECEIVER_RECV,
#ifdef USE_RX_SPEKTRUM_TELEMETRY
DSM_RECEIVER_TLM = 0x4,
DSM_RECEIVER_TLM,
#endif
} dsm_receiver_status_e;
@ -75,6 +76,8 @@ extern "C" {
uint32_t timeout;
uint32_t timeLastPacket;
uint16_t bindPackets;
#ifdef USE_RX_SPEKTRUM_TELEMETRY
uint32_t timeLastTelemetry;
bool sendTelemetry;
@ -375,6 +378,7 @@ extern "C" {
void cyrf6936SetSopCode(const uint8_t ) {}
void cyrf6936SetDataCode(const uint8_t ) {}
void cyrf6936StartRecv(void) {}
void cyrf6936SendLen(uint8_t *, const uint8_t ) {}
void cyrf6936RecvLen(uint8_t *data, const uint8_t length)
{
if (length == packetLen) {