fix: Deactivate logs and close log file if USB is connected (#4024)

This commit is contained in:
Michael
2023-09-24 18:43:01 +10:00
committed by GitHub
parent 47ff7284fd
commit bd9440daa3
+1 -1
View File
@@ -271,7 +271,7 @@ void logsWrite()
return;
}
if (isFunctionActive(FUNCTION_LOGS) && logDelay100ms > 0) {
if (isFunctionActive(FUNCTION_LOGS) && logDelay100ms > 0 && !usbPlugged()) {
#if defined(SIMU) || !defined(RTCLOCK)
tmr10ms_t tmr10ms = get_tmr10ms(); // tmr10ms works in 10ms increments
if (lastLogTime == 0 || (tmr10ms_t)(tmr10ms - lastLogTime) >= (tmr10ms_t)(logDelay100ms*10)-1) {