Skip to content

Commit

Permalink
make sure logs are deactivated and log file is closed if USB is conne…
Browse files Browse the repository at this point in the history
…cted
  • Loading branch information
mha1 committed Sep 23, 2023
1 parent daf6918 commit 3c4a57a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radio/src/logs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3c4a57a

Please sign in to comment.