From 28de4c63bb73f50886938d05715e26fdd4df309f Mon Sep 17 00:00:00 2001 From: Hans Christian Olaussen <41271048+klutvott123@users.noreply.github.com> Date: Thu, 6 Dec 2018 21:05:00 +0100 Subject: [PATCH] Fix comment and write to NULL --- src/main/telemetry/msp_shared.c | 2 +- src/main/telemetry/smartport.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/telemetry/msp_shared.c b/src/main/telemetry/msp_shared.c index 5ac2189d87..2c0910f42d 100644 --- a/src/main/telemetry/msp_shared.c +++ b/src/main/telemetry/msp_shared.c @@ -174,7 +174,7 @@ bool handleMspFrame(uint8_t *frameStart, int frameLength, uint8_t *skipsBeforeRe } // Skip a few telemetry requests if command is MSP_EEPROM_WRITE - if (packet->cmd == MSP_EEPROM_WRITE) { + if (packet->cmd == MSP_EEPROM_WRITE && skipsBeforeResponse) { *skipsBeforeResponse = TELEMETRY_REQUEST_SKIPS_AFTER_EEPROMWRITE; } diff --git a/src/main/telemetry/smartport.c b/src/main/telemetry/smartport.c index 3e93de0da9..e0d581f3f8 100644 --- a/src/main/telemetry/smartport.c +++ b/src/main/telemetry/smartport.c @@ -507,7 +507,7 @@ void processSmartPortTelemetry(smartPortPayload_t *payload, volatile bool *clear uint8_t *frameStart = (uint8_t *)&payload->valueId; smartPortMspReplyPending = handleMspFrame(frameStart, SMARTPORT_MSP_PAYLOAD_SIZE, &skipRequests); - // Don't send MSP response if MSP command is MSP_EEPROM_WRITE + // Don't send MSP response after write to eeprom // CPU just got out of suspended state after writeEEPROM() // We don't know if the receiver is listening again // Skip a few telemetry requests before sending response