Removes the constant "+00000ms:" from the debug output.

This commit is contained in:
rotorman
2021-08-21 11:22:16 +02:00
parent 83413a2242
commit 6f7a0eee55
5 changed files with 4 additions and 15 deletions
-4
View File
@@ -26,10 +26,6 @@
traceCallbackFunc traceCallback = 0; traceCallbackFunc traceCallback = 0;
#endif #endif
#if !defined(SIMU)
uint32_t debugCounter1ms = 0;
#endif
#if defined(SIMU) #if defined(SIMU)
#define PRINTF_BUFFER_SIZE 1024 #define PRINTF_BUFFER_SIZE 1024
void debugPrintf(const char * format, ...) void debugPrintf(const char * format, ...)
+2 -6
View File
@@ -54,8 +54,8 @@ uint8_t aux2SerialTracesEnabled();
#define debugPrintf(...) #define debugPrintf(...)
#endif #endif
#define TRACE_TIME_FORMAT "%0.2f " #define TRACE_TIME_FORMAT "%0.2fs: "
#define TRACE_TIME_VALUE ((float)g_tmr10ms / 100) #define TRACE_TIME_VALUE ((float)g_tmr10ms / 100.0)
#define TRACE_NOCRLF(...) debugPrintf(__VA_ARGS__) #define TRACE_NOCRLF(...) debugPrintf(__VA_ARGS__)
#define TRACE(f_, ...) debugPrintf((TRACE_TIME_FORMAT f_ CRLF), TRACE_TIME_VALUE, ##__VA_ARGS__) #define TRACE(f_, ...) debugPrintf((TRACE_TIME_FORMAT f_ CRLF), TRACE_TIME_VALUE, ##__VA_ARGS__)
@@ -432,9 +432,5 @@ extern const char * const debugTimerNames[DEBUG_TIMERS_COUNT];
#endif //#if defined(DEBUG_TIMERS) #endif //#if defined(DEBUG_TIMERS)
#if !defined(SIMU)
extern uint32_t debugCounter1ms;
#endif
#endif // _DEBUG_H_ #endif // _DEBUG_H_
+1 -1
View File
@@ -96,7 +96,7 @@ void ViewMain::setCurrentMainView(unsigned view)
{ {
if (view < getMainViewsCount()) { if (view < getMainViewsCount()) {
setScrollPositionX(view * pageWidth); setScrollPositionX(view * pageWidth);
TRACE("### switched to view #%i", g_model.view); TRACE("### switched to view #%u", g_model.view);
} }
} }
+1 -3
View File
@@ -45,9 +45,8 @@ void serialPrintf(const char * format, ...)
va_list arglist; va_list arglist;
char tmp[PRINTF_BUFFER_SIZE+1]; char tmp[PRINTF_BUFFER_SIZE+1];
snprintf(tmp, PRINTF_BUFFER_SIZE, "+%05lums: ", debugCounter1ms);
va_start(arglist, format); va_start(arglist, format);
vsnprintf(tmp+strlen(tmp), PRINTF_BUFFER_SIZE-strlen(tmp), format, arglist); vsnprintf(tmp, PRINTF_BUFFER_SIZE, format, arglist);
tmp[PRINTF_BUFFER_SIZE] = '\0'; tmp[PRINTF_BUFFER_SIZE] = '\0';
va_end(arglist); va_end(arglist);
@@ -55,7 +54,6 @@ void serialPrintf(const char * format, ...)
while (*t) { while (*t) {
serialPutc(*t++); serialPutc(*t++);
} }
debugCounter1ms = 0;
} }
void serialCrlf() void serialCrlf()
@@ -57,7 +57,6 @@ volatile rotenc_t rotencValue = 0;
#if defined(DEBUG) #if defined(DEBUG)
volatile tmr10ms_t g_tmr10ms; volatile tmr10ms_t g_tmr10ms;
uint32_t debugCounter1ms = 0;
#endif #endif
uint32_t firmwareSize; uint32_t firmwareSize;