From 43bfcae843661cef3a113477b9ad8bd25d9cc080 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Wed, 24 Feb 2021 22:37:03 +0100 Subject: [PATCH] Add support for STM32F4 --- src/log/hasp_debug.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/log/hasp_debug.cpp b/src/log/hasp_debug.cpp index d58726bc..4f6d36b0 100644 --- a/src/log/hasp_debug.cpp +++ b/src/log/hasp_debug.cpp @@ -25,6 +25,8 @@ #elif defined(ARDUINO_ARCH_ESP32) #include #include +#elif defined(STM32F4xx) +#include #endif #include "hasp_conf.h" @@ -336,11 +338,12 @@ static void debugPrintTimestamp(int level, Print* _logOutput) struct tm* timeinfo; int rslt; - rslt = gettimeofday(&tval, NULL); - if(rslt) { - // uint32_t msecs = millis(); - // _logOutput->printf(PSTR("[%9d.%03d]"), msecs / 1000, msecs % 1000); - } else { + /* rslt = gettimeofday(&tval, NULL); + if(rslt) { + // uint32_t msecs = millis(); + // _logOutput->printf(PSTR("[%9d.%03d]"), msecs / 1000, msecs % 1000); + } else */ + { timeinfo = localtime(&tval.tv_sec); }