-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing log steps at 0.1s period #1967
Conversation
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
Here's a little before/after comparison. Setup is a TX16s with a non-trivial model selected and logging enabled at 0.1s for 15 minutes. The radio is not touched, just sitting there logging. Before: current 2.7.1 implementation showing a log with 8833 log steps (roughly 15 minutes). It can be seen that the expected dt of 100ms is not well maintained with more than 12% off the requested 100ms.
1 100 7735 0.876 After: current main with using software timers as proposed in the PR in the same setup as above with 9071 log steps at 0.1s. dt's are locked to 100ms. The single 80ms dt is the first log step entry.
1 100 9070 1 I tried different scenarios but would appreciate community testing |
@raphaelcoeffic - can please review this pr, thx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thx!
@raphaelcoeffic Thx and sorry for bugging you |
No problem! That was the right thing to do! I have quite some review work to catch up. The LVGL stuff has literally sucked up my time… |
Fix bug introduced in EdgeTX#1967 which only affects !defined(RTCLOCK) boards
Fix bug introduced in EdgeTX#1967 which only affects !defined(RTCLOCK) boards
Fix bug introduced in #1967 which only affects !defined(RTCLOCK) boards
Fixes #1966
Summary of changes
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
Thanks to @rotorman!