diff --git a/cube/User/Src/main2.c b/cube/User/Src/main2.c index 45844b3..95211c8 100644 --- a/cube/User/Src/main2.c +++ b/cube/User/Src/main2.c @@ -44,9 +44,10 @@ void second_tick(void *handle) { uint32_t cnt = tmpSum / tmpCnt; double f = 1.0 / ((double)cnt) * 1.0e6; + uint32_t ff = (uint32_t) ((f + 0.005) * 100); t_seconds *seconds = wizGetSeconds(); - coloredMsg(LOG_GREEN, "Tick %f %d %lu %lu", f, seconds->valid, seconds->missedUpdates, seconds->seconds); + coloredMsg(LOG_GREEN, "Tick %ld %f %d %lu %lu", ff, f, seconds->valid, seconds->missedUpdates, seconds->seconds); }