From 3d9a82e4aeda08bff2e1b191c599927c88be6945 Mon Sep 17 00:00:00 2001 From: jflyper Date: Fri, 13 Jan 2017 02:58:58 +0900 Subject: [PATCH] Disable trampHandleResponse() instead of trampReceive() --- src/main/io/vtx_tramp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/io/vtx_tramp.c b/src/main/io/vtx_tramp.c index 18316bc71..0d1664f3a 100644 --- a/src/main/io/vtx_tramp.c +++ b/src/main/io/vtx_tramp.c @@ -226,6 +226,8 @@ void trampReceive(uint32_t currentTimeUs) if (c == 0x0F) { trampReceiveState = S_WAIT_CODE; trampFrameStartUs = currentTimeUs; + } else { + trampReceivePos = 0; } break; @@ -241,8 +243,9 @@ void trampReceive(uint32_t currentTimeUs) case S_DATA: if (trampReceivePos == 16) { uint8_t cksum = trampChecksum(trampRespBuffer); - if ((trampRespBuffer[14] == cksum) && (trampRespBuffer[15] == 0)) - trampHandleResponse(); + if ((trampRespBuffer[14] == cksum) && (trampRespBuffer[15] == 0)) { + // trampHandleResponse(); + } trampReceiveState = S_WAIT_LEN; trampReceivePos = 0; @@ -259,7 +262,7 @@ void trampProcess(uint32_t currentTimeUs) if (trampStatus == TRAMP_STATUS_BAD_DEVICE) return; - trampReceive(currentTimeUs); + // trampReceive(currentTimeUs); if (trampStatus == TRAMP_STATUS_OFFLINE) { if (cmp32(currentTimeUs, lastQueryRTimeUs) > 1000 * 1000) {