mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 13:25:20 +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)
|
#if defined(GHOST)
|
||||||
struct {
|
struct {
|
||||||
GhostMenuData line[GHST_MENU_LINES + 1];
|
GhostMenuData line[GHST_MENU_LINES + 1];
|
||||||
|
uint8_t menuFlags;
|
||||||
uint8_t menuAction;
|
uint8_t menuAction;
|
||||||
uint8_t buttonAction;
|
uint8_t buttonAction;
|
||||||
} ghostMenu;
|
} ghostMenu;
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
|
|
||||||
uint8_t createGhostMenuControlFrame(uint8_t * frame, int16_t * pulses)
|
uint8_t createGhostMenuControlFrame(uint8_t * frame, int16_t * pulses)
|
||||||
{
|
{
|
||||||
moduleState[EXTERNAL_MODULE].counter = GHST_FRAME_CHANNEL;
|
|
||||||
|
|
||||||
uint8_t * buf = frame;
|
uint8_t * buf = frame;
|
||||||
#if SPORT_MAX_BAUDRATE < 400000
|
#if SPORT_MAX_BAUDRATE < 400000
|
||||||
*buf++ = g_eeGeneral.telemetryBaudrate == GHST_TELEMETRY_RATE_400K ? GHST_ADDR_MODULE_SYM : GHST_ADDR_MODULE_ASYM;
|
*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]);
|
extmodulePulsesData.ghost.length = createGhostMenuControlFrame(pulses, &channelOutputs[g_model.moduleData[EXTERNAL_MODULE].channelsStart]);
|
||||||
else
|
else
|
||||||
extmodulePulsesData.ghost.length = createGhostChannelsFrame(pulses, &channelOutputs[g_model.moduleData[EXTERNAL_MODULE].channelsStart]);
|
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;
|
GhostMenuFrame * packet;
|
||||||
GhostMenuData * lineData;
|
GhostMenuData * lineData;
|
||||||
|
|
||||||
packet = (GhostMenuFrame * ) telemetryRxBuffer;
|
packet = (GhostMenuFrame * ) telemetryRxBuffer;
|
||||||
lineData = (GhostMenuData *) &reusableBuffer.ghostMenu.line[packet->lineIndex];
|
lineData = (GhostMenuData *) &reusableBuffer.ghostMenu.line[packet->lineIndex];
|
||||||
lineData->splitLine = 0;
|
lineData->splitLine = 0;
|
||||||
reusableBuffer.ghostMenu.menuAction = packet->menuFlags;
|
reusableBuffer.ghostMenu.menuFlags = packet->menuFlags;
|
||||||
lineData->lineFlags = packet->lineFlags;
|
lineData->lineFlags = packet->lineFlags;
|
||||||
for (uint8_t i = 0; i < GHST_MENU_CHARS; i++) {
|
for (uint8_t i = 0; i < GHST_MENU_CHARS; i++) {
|
||||||
if (packet->menuText[i] == 0x7C) {
|
if (packet->menuText[i] == 0x7C) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue