Skip to content

Commit

Permalink
Use printf for LOG_DEBUG in sitl.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca committed Jun 21, 2024
1 parent ffb536d commit 74b638d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/common/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
#include <stdarg.h>
#include <ctype.h>

#if defined(SEMIHOSTING)
#if defined(SEMIHOSTING) || defined(SITL_BUILD)
#include <stdio.h>
#endif

#include "build/version.h"
#include "build/debug.h"

#include "drivers/serial.h"
#include "drivers/time.h"
Expand Down Expand Up @@ -125,6 +126,7 @@ static void logPrint(const char *buf, size_t size)
fputc(buf[ii], stdout);
}
#endif
SD(printf("%s\n", buf));
if (logPort) {
// Send data via UART (if configured & connected - a safeguard against zombie VCP)
if (serialIsConnected(logPort)) {
Expand Down

0 comments on commit 74b638d

Please sign in to comment.