mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-27 13:52:14 +00:00
Replace string-concatenation logging with printf-style F-variants
Converted log calls across src/, examples/, and test/ to use DEBUGF/TRACEF/ERRORF/etc. macros instead of std::string + operator+. This eliminates temporary heap allocations on every log call, which matters on memory-constrained MCUs.
This commit is contained in:
1 parent
3babdc001d
commit
79b75bbd4e
35 files changed
+595
-604
No files matched your search
@@ -20,12 +20,12 @@ void testTime()
|
||||
double diff_time;
|
||||
|
||||
diff_time = (double)(end_ltime - start_ltime) / 1000.0;
|
||||
TRACE(std::string("ltime diff: ") + std::to_string(diff_time));
|
||||
TRACEF("ltime diff: %f", diff_time);
|
||||
TEST_ASSERT_TRUE(diff_time > sleep_time * 0.99);
|
||||
TEST_ASSERT_TRUE(diff_time < sleep_time * 1.01);
|
||||
|
||||
diff_time = end_dtime - start_dtime;
|
||||
TRACE(std::string("dtime diff: ") + std::to_string(diff_time));
|
||||
TRACEF("dtime diff: %f", diff_time);
|
||||
TEST_ASSERT_TRUE(diff_time > sleep_time * 0.99);
|
||||
TEST_ASSERT_TRUE(diff_time < sleep_time * 1.01);
|
||||
|
||||
|
||||
Reference in new issue
Block a user