1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 04:15:26 +03:00

Remark from projectkk2glider taken into account

Serial2 connection and USB CDC output now waits there is some free space
before adding anything to the buffer
This commit is contained in:
Bertrand Songis 2015-08-27 14:38:47 +02:00
parent 330a91441a
commit 5d7f55fa97
6 changed files with 26 additions and 14 deletions

View file

@ -61,7 +61,6 @@ void debugPrintf(const char * format, ...)
#if defined(DEBUG_TRACE_BUFFER)
static struct TraceElement traceBuffer[TRACE_BUFFER_LEN];
static uint8_t traceBufferPos;
extern Fifo<512> uart3TxFifo;
gtime_t filltm(gtime_t *t, struct gtm *tp);
void trace_event(enum TraceEvent event, uint32_t data)
@ -107,7 +106,7 @@ void dumpTraceBuffer()
TRACE(" %03d 0x%08x", traceBuffer[n].event, traceBuffer[n].data);
if (traceBuffer[n].time == 0 && traceBuffer[n].time_ms == 0) break;
if ((n % 5) == 0) {
while (!uart3TxFifo.empty()) {
while (!serial2TxFifo.empty()) {
CoTickDelay(1);
}
}