1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

Avoid resetting page cycle index when re-enabling page cycling so that

it is possible to stop on a page, inspect it, and then resume cycling at
the point that it was stopped.
This commit is contained in:
Dominic Clifton 2015-02-22 14:42:43 +00:00
parent 4a1b27443f
commit b4e4684ac7
3 changed files with 7 additions and 0 deletions

View file

@ -578,7 +578,12 @@ void displaySetNextPageChangeAt(uint32_t futureMicros)
void displayEnablePageCycling(void)
{
pageState.pageFlags |= PAGE_STATE_FLAG_CYCLE_ENABLED;
}
void displayResetPageCycling(void)
{
pageState.cycleIndex = CYCLE_PAGE_ID_COUNT - 1; // start at first page
}
void displayDisablePageCycling(void)

View file

@ -35,4 +35,5 @@ void displayShowFixedPage(pageId_e pageId);
void displayEnablePageCycling(void);
void displayDisablePageCycling(void);
void displayResetPageCycling(void);
void displaySetNextPageChangeAt(uint32_t futureMicros);

View file

@ -398,6 +398,7 @@ void init(void)
#ifdef USE_OLED_GPS_DEBUG_PAGE_ONLY
displayShowFixedPage(PAGE_GPS);
#else
displayResetPageCycling();
displayEnablePageCycling();
#endif
}