1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Fix comment and write to NULL

This commit is contained in:
Hans Christian Olaussen 2018-12-06 21:05:00 +01:00
parent f91a3a46b8
commit 28de4c63bb
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}

View file

@ -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