1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Corrected smartport regression issue with msp_shared

Corrected condition where an extra padded zero was added to outgoing msp buffers.
Whitespace tidy and removal of unnecessary condition.
Commented OSD and CMS from STM32F3DISCOVERY target.h
Various improvements to msp_shared (removed byte loops, point arithmetic)
Raised schedule priority of CRSF device and MSP calls
Reworked buffers in msp_shared to enable writes.
Moved msp buffers to msp_shared
Added new custom frames and reworking msp implementation
Implemented CRSF device info reply
Adding crsf ping/pong device info functionality
Changed Colibri FC address to Betaflight address
Implementing MSP in CRSF Telemetry
Decoupled msp functionality from smartport into msp_shared
Moved USE_SERVOS to FLASH>128 per mikeller
This commit is contained in:
Curtis Bangert 2017-08-25 09:22:02 -04:00
parent ab53b178ca
commit 863b24ae6a
17 changed files with 738 additions and 229 deletions

View file

@ -0,0 +1,29 @@
#pragma once
#include "msp/msp.h"
#include "rx/crsf.h"
#include "telemetry/smartport.h"
typedef void (*mspResponseFnPtr)(uint8_t *payload);
typedef struct mspPackage_s {
sbuf_t requestFrame;
uint8_t *requestBuffer;
uint8_t *responseBuffer;
mspPacket_t *requestPacket;
mspPacket_t *responsePacket;
} mspPackage_t;
typedef union mspRxBuffer_u {
uint8_t smartPortMspRxBuffer[SMARTPORT_MSP_RX_BUF_SIZE];
uint8_t crsfMspRxBuffer[CRSF_MSP_RX_BUF_SIZE];
} mspRxBuffer_t;
typedef union mspTxBuffer_u {
uint8_t smartPortMspTxBuffer[SMARTPORT_MSP_TX_BUF_SIZE];
uint8_t crsfMspTxBuffer[CRSF_MSP_TX_BUF_SIZE];
} mspTxBuffer_t;
void initSharedMsp();
bool handleMspFrame(uint8_t *frameStart, uint8_t *frameEnd);
bool sendMspReply(uint8_t payloadSize, mspResponseFnPtr responseFn);