Fix missing log steps at 0.1s period (#1967)
fixed issued where log steps would be missed due to 10ms timer resolution - simulator: allow for one get_tmr10ms() tick (10ms) deviation - radio: switched to FreeRTOS software timer at user requested period code cleanup log.cpp: made variable lastLogTime static log.cpp: deleted unused variable g_logError functions.cpp, logs.cpp, sdcard.h: renamed variable logDelay to logDelay100ms to show it is scaled to 100ms increments
This commit is contained in:
+10
-1
@@ -473,6 +473,10 @@ void guiMain(event_t evt)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(SIMU)
|
||||
void initLoggingTimer();
|
||||
#endif
|
||||
|
||||
void perMain()
|
||||
{
|
||||
DEBUG_TIMER_START(debugTimerPerMain1);
|
||||
@@ -481,7 +485,12 @@ void perMain()
|
||||
|
||||
if (!usbPlugged() || (getSelectedUsbMode() == USB_UNSELECTED_MODE)) {
|
||||
checkEeprom();
|
||||
logsWrite();
|
||||
|
||||
#if !defined(SIMU) // use FreeRTOS software timer if radio firmware
|
||||
initLoggingTimer(); // initialize software timer for logging
|
||||
#else
|
||||
logsWrite(); // call logsWrite the old way for simu
|
||||
#endif
|
||||
}
|
||||
|
||||
handleUsbConnection();
|
||||
|
||||
Reference in New Issue
Block a user