Re-added sending of empty telemetry frames in FPort due to problems with the r-XSR without them.

This commit is contained in:
mikeller 2018-01-18 18:14:26 +13:00
parent d8a12e5957
commit 9e54f2344a
1 changed files with 7 additions and 1 deletions

View File

@ -107,6 +107,8 @@ typedef struct fportFrame_s {
fportData_t data;
} fportFrame_t;
static const smartPortPayload_t emptySmartPortFrame = { .frameId = 0, .valueId = 0, .data = 0 };
#define FPORT_REQUEST_FRAME_LENGTH sizeof(fportFrame_t)
#define FPORT_RESPONSE_FRAME_LENGTH (sizeof(uint8_t) + sizeof(smartPortPayload_t))
@ -322,7 +324,11 @@ static uint8_t fportFrameStatus(rxRuntimeConfig_t *rxRuntimeConfig)
processSmartPortTelemetry(mspPayload, &clearToSend, NULL);
}
clearToSend = false;
if (clearToSend) {
smartPortWriteFrameFport(&emptySmartPortFrame);
clearToSend = false;
}
}
}
#endif