1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

OSD - Always use specifically named stats refresh phases in.

This commit is contained in:
Dominic Clifton 2022-01-23 15:29:15 +01:00
parent e0f27197ff
commit 023a7e5b00

View file

@ -965,7 +965,7 @@ static bool osdRefreshStats(void)
if (osdStatsRenderingState.rowCount > 0) { if (osdStatsRenderingState.rowCount > 0) {
phase = RENDER_STATS; phase = RENDER_STATS;
} else { } else {
phase++; phase = COUNT_STATS;
} }
displayClearScreen(osdDisplayPort, DISPLAY_CLEAR_NONE); displayClearScreen(osdDisplayPort, DISPLAY_CLEAR_NONE);
break; break;
@ -975,7 +975,7 @@ static bool osdRefreshStats(void)
// Go through the logic one time to determine how many stats are actually displayed. // Go through the logic one time to determine how many stats are actually displayed.
bool count_phase_complete = osdRenderStatsContinue(); bool count_phase_complete = osdRenderStatsContinue();
if (count_phase_complete) { if (count_phase_complete) {
phase++; phase = CLEAR_SCREEN;
} }
break; break;
} }
@ -984,7 +984,7 @@ static bool osdRefreshStats(void)
// Then clear the screen and commence with normal stats display which will // Then clear the screen and commence with normal stats display which will
// determine if the heading should be displayed and also center the content vertically. // determine if the heading should be displayed and also center the content vertically.
displayClearScreen(osdDisplayPort, DISPLAY_CLEAR_NONE); displayClearScreen(osdDisplayPort, DISPLAY_CLEAR_NONE);
phase++; phase = RENDER_STATS;
break; break;
case RENDER_STATS: case RENDER_STATS:
completed = osdRenderStatsContinue(); completed = osdRenderStatsContinue();