diff --git a/flight/Modules/System/systemmod.c b/flight/Modules/System/systemmod.c index b3da26870..a787a2a82 100644 --- a/flight/Modules/System/systemmod.c +++ b/flight/Modules/System/systemmod.c @@ -365,7 +365,7 @@ static void updateStats() if (now > lastTickCount) { uint32_t dT = (xTaskGetTickCount() - lastTickCount) * portTICK_RATE_MS; // in ms stats.CPULoad = - 100 - (uint8_t) round(100.0 * ((float)idleCounter / ((float)dT / 1000.0)) / (float)IDLE_COUNTS_PER_SEC_AT_NO_LOAD); + 100 - (uint8_t) roundf(100.0f * ((float)idleCounter / ((float)dT / 1000.0f)) / (float)IDLE_COUNTS_PER_SEC_AT_NO_LOAD); } //else: TickCount has wrapped, do not calc now lastTickCount = now; idleCounterClear = 1;