mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 12:55:12 +03:00
Fix Ghost menu glitch
This commit is contained in:
parent
4555be0286
commit
2dfa8a80ab
3 changed files with 4 additions and 4 deletions
|
@ -1131,6 +1131,7 @@ union ReusableBuffer
|
|||
#if defined(GHOST)
|
||||
struct {
|
||||
GhostMenuData line[GHST_MENU_LINES + 1];
|
||||
uint8_t menuFlags;
|
||||
uint8_t menuAction;
|
||||
uint8_t buttonAction;
|
||||
} ghostMenu;
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
uint8_t createGhostMenuControlFrame(uint8_t * frame, int16_t * pulses)
|
||||
{
|
||||
moduleState[EXTERNAL_MODULE].counter = GHST_FRAME_CHANNEL;
|
||||
|
||||
uint8_t * buf = frame;
|
||||
#if SPORT_MAX_BAUDRATE < 400000
|
||||
*buf++ = g_eeGeneral.telemetryBaudrate == GHST_TELEMETRY_RATE_400K ? GHST_ADDR_MODULE_SYM : GHST_ADDR_MODULE_ASYM;
|
||||
|
@ -118,5 +116,7 @@ void setupPulsesGhost()
|
|||
extmodulePulsesData.ghost.length = createGhostMenuControlFrame(pulses, &channelOutputs[g_model.moduleData[EXTERNAL_MODULE].channelsStart]);
|
||||
else
|
||||
extmodulePulsesData.ghost.length = createGhostChannelsFrame(pulses, &channelOutputs[g_model.moduleData[EXTERNAL_MODULE].channelsStart]);
|
||||
|
||||
moduleState[EXTERNAL_MODULE].counter = GHST_FRAME_CHANNEL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.menuFlags = packet->menuFlags;
|
||||
lineData->lineFlags = packet->lineFlags;
|
||||
for (uint8_t i = 0; i < GHST_MENU_CHARS; i++) {
|
||||
if (packet->menuText[i] == 0x7C) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue