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:
+1
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user