Merge with latest 2.3
This commit is contained in:
@@ -192,11 +192,10 @@ void processGhostTelemetryFrame()
|
||||
{
|
||||
GhostMenuFrame * packet;
|
||||
GhostMenuData * lineData;
|
||||
|
||||
packet = (GhostMenuFrame * ) telemetryRxBuffer;
|
||||
lineData = (GhostMenuData *) &reusableBuffer.ghostMenu.line[packet->lineIndex];
|
||||
lineData->splitLine = 0;
|
||||
reusableBuffer.ghostMenu.menuAction = packet->menuFlags;
|
||||
reusableBuffer.ghostMenu.menuStatus = packet->menuStatus;
|
||||
lineData->lineFlags = packet->lineFlags;
|
||||
for (uint8_t i = 0; i < GHST_MENU_CHARS; i++) {
|
||||
if (packet->menuText[i] == 0x7C) {
|
||||
@@ -208,8 +207,6 @@ void processGhostTelemetryFrame()
|
||||
}
|
||||
}
|
||||
lineData->menuText[GHST_MENU_CHARS] = '\0';
|
||||
if (packet->lineIndex == GHST_MENU_LINES - 1)
|
||||
lineData->menuUpdateNeeded = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,13 @@ enum GhostMenuControl
|
||||
GHST_MENU_CTRL_REDRAW = 0X04,
|
||||
};
|
||||
|
||||
enum GhostMenuStatus
|
||||
{
|
||||
GHST_MENU_STATUS_UNOPENED = 0x00,
|
||||
GHST_MENU_STATUS_OPENED = 0x01,
|
||||
GHST_MENU_STATUS_CLOSING = 0x02,
|
||||
};
|
||||
|
||||
enum GhostFrames
|
||||
{
|
||||
GHST_FRAME_CHANNEL,
|
||||
@@ -157,8 +164,8 @@ struct GhostMenuFrame
|
||||
uint8_t address;
|
||||
uint8_t length ;
|
||||
uint8_t packetId;
|
||||
uint8_t menuFlags; // GHST_MENU_CTRL
|
||||
uint8_t lineFlags; // Carat states, Inverse, Bold for each of Menu Label, and Value
|
||||
uint8_t menuStatus; // GhostMenuStatus
|
||||
uint8_t lineFlags; // GhostLineFlags
|
||||
uint8_t lineIndex; // 0 = first line
|
||||
unsigned char menuText[GHST_MENU_CHARS];
|
||||
uint8_t crc;
|
||||
@@ -166,9 +173,9 @@ struct GhostMenuFrame
|
||||
|
||||
struct GhostMenuData
|
||||
{
|
||||
uint8_t menuFlags; // Update Line, Clear Menu, etc.
|
||||
uint8_t menuStatus; // Update Line, Clear Menu, etc.
|
||||
uint8_t lineFlags; // Carat states, Inverse, Bold for each of Menu Label, and Value
|
||||
uint8_t splitLine; // Store beginning of Value substring
|
||||
char menuText[GHST_MENU_CHARS + 1];
|
||||
uint8_t menuUpdateNeeded;
|
||||
};
|
||||
|
||||
|
||||
@@ -288,6 +288,7 @@ void telemetryInit(uint8_t protocol)
|
||||
#if defined(LUA)
|
||||
outputTelemetryBuffer.reset();
|
||||
#endif
|
||||
telemetryPortSetDirectionInput();
|
||||
}
|
||||
else if (protocol == PROTOCOL_TELEMETRY_SPEKTRUM) {
|
||||
// Spektrum's own small race RX (SPM4648) uses 125000 8N1, use the same since there is no real standard
|
||||
@@ -322,7 +323,7 @@ void telemetryInit(uint8_t protocol)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS3) && !defined(SIMU)
|
||||
#if defined(AFHDS3)
|
||||
else if (protocol == PROTOCOL_TELEMETRY_AFHDS3) {
|
||||
telemetryPortInvertedInit(AFHDS3_BAUDRATE);
|
||||
telemetryPortSetDirectionInput();
|
||||
|
||||
Reference in New Issue
Block a user