mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 21:26:43 +00:00
Add D_TIMESTAMP to lang.h
This commit is contained in:
parent
55d45f29c8
commit
8fbab678b3
@ -66,7 +66,7 @@ static void debugPrintTimestamp(int level, Print* _logOutput)
|
||||
unsigned long int milli = curTime.tv_usec / 1000;
|
||||
char buffer[24];
|
||||
// strftime(buffer, sizeof(buffer), "[%b %d %H:%M:%S", timeinfo); // Literal String
|
||||
strftime(buffer, sizeof(buffer), "[%H:%M:%S", timeinfo); // Literal String
|
||||
strftime(buffer, sizeof(buffer), "[" D_TIMESTAMP, timeinfo); // Literal String
|
||||
|
||||
#ifdef ARDUINO
|
||||
_logOutput->printf(PSTR("%s.%03lu]"), buffer, milli);
|
||||
@ -78,9 +78,9 @@ static void debugPrintTimestamp(int level, Print* _logOutput)
|
||||
|
||||
uint32_t msecs = millis();
|
||||
#ifdef ARDUINO
|
||||
_logOutput->printf(PSTR("[%15d.%03d]"), msecs / 1000, msecs % 1000);
|
||||
_logOutput->printf(PSTR("[" D_TIME_MILLIS ".%03d]"), msecs / 1000, msecs % 1000);
|
||||
#else
|
||||
debug_print(_logOutput, PSTR("[%15d.%03d]"), msecs / 1000, msecs % 1000);
|
||||
debug_print(_logOutput, PSTR("[" D_TIME_MILLIS ".%03d]"), msecs / 1000, msecs % 1000);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
#define HASP_LANG_H
|
||||
|
||||
#ifndef HASP_LANGUAGE
|
||||
#include "en_US.h"
|
||||
#include "en_US.h"
|
||||
#else
|
||||
#define QUOTEME(x) QUOTEME_1(x)
|
||||
#define QUOTEME_1(x) #x
|
||||
#define INCLUDE_FILE(x) QUOTEME(x.h)
|
||||
#include INCLUDE_FILE(HASP_LANGUAGE)
|
||||
#define QUOTEME(x) QUOTEME_1(x)
|
||||
#define QUOTEME_1(x) #x
|
||||
#define INCLUDE_FILE(x) QUOTEME(x.h)
|
||||
#include INCLUDE_FILE(HASP_LANGUAGE)
|
||||
#endif
|
||||
|
||||
// language independent defines
|
||||
@ -15,4 +15,7 @@
|
||||
#define D_BULLET " * "
|
||||
#define D_MANUFACTURER "openHASP"
|
||||
|
||||
#define D_TIMESTAMP "%H:%M:%S" // Used when reference time is set from NTP
|
||||
#define D_TIME_MILLIS "%8d" // Used when no reference clock could be set
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user