From 7418172f7942f1c4631127aac39a1509cb5b7f9d Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Mon, 11 Dec 2023 08:06:22 +0100 Subject: [PATCH] platform: use Static<> init for serial printer, remove carriage return --- src/Platform.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Platform.cpp b/src/Platform.cpp index cb04cb7..38a076c 100644 --- a/src/Platform.cpp +++ b/src/Platform.cpp @@ -23,13 +23,14 @@ NTPClient timeClient(wifiUdp, "pool.ntp.org", 3600 * -7); #ifdef PLATFORM_PHOTON STARTUP(BootOptions::initPins()); #else +#include "inputs/Serial.h" #ifdef CONFIG_MQTT #include "platform/arduino/MQTTTelemetry.h" #endif void printNewline(Print* logOutput, int logLevel) { (void)logLevel; // unused - logOutput->print("\r\n"); + logOutput->print("\n"); } int printEspLog(const char* fmt, va_list args) { @@ -101,7 +102,7 @@ Platform::preSetup() Log.begin(LOG_LEVEL_TRACE, Static::instance()->logPrinter()); Static::instance()->setSequencer(Static::instance()); #else - Log.begin(LOG_LEVEL_TRACE, &Serial); + Log.begin(LOG_LEVEL_TRACE, Static::instance()->logPrinter()); #endif Log.setSuffix(printNewline); #endif