GPS - remove temporary hack for fixing the OLED page to the GPS page.
Fix incorrect flag usage.
This commit is contained in:
parent
9b81dea320
commit
ce6582b88a
|
@ -70,20 +70,6 @@ static rxConfig_t *rxConfig;
|
||||||
|
|
||||||
static char lineBuffer[SCREEN_CHARACTER_COLUMN_COUNT + 1];
|
static char lineBuffer[SCREEN_CHARACTER_COLUMN_COUNT + 1];
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
PAGE_WELCOME,
|
|
||||||
PAGE_ARMED,
|
|
||||||
PAGE_BATTERY,
|
|
||||||
PAGE_SENSORS,
|
|
||||||
PAGE_RX,
|
|
||||||
PAGE_PROFILE,
|
|
||||||
PAGE_GPS
|
|
||||||
#ifdef ENABLE_DEBUG_OLED_PAGE
|
|
||||||
,
|
|
||||||
PAGE_DEBUG
|
|
||||||
#endif
|
|
||||||
} pageId_e;
|
|
||||||
|
|
||||||
const char* pageTitles[] = {
|
const char* pageTitles[] = {
|
||||||
"CLEANFLIGHT",
|
"CLEANFLIGHT",
|
||||||
"ARMED",
|
"ARMED",
|
||||||
|
@ -442,7 +428,7 @@ void updateDisplay(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
pageState.pageChanging = (pageState.pageFlags & PAGE_STATE_FLAG_FORCE_PAGE_CHANGE) ||
|
pageState.pageChanging = (pageState.pageFlags & PAGE_STATE_FLAG_FORCE_PAGE_CHANGE) ||
|
||||||
(((int32_t)(now - pageState.nextPageAt) >= 0L && (pageState.pageFlags & PAGE_STATE_FLAG_FORCE_PAGE_CHANGE)));
|
(((int32_t)(now - pageState.nextPageAt) >= 0L && (pageState.pageFlags & PAGE_STATE_FLAG_CYCLE_ENABLED)));
|
||||||
if (pageState.pageChanging && (pageState.pageFlags & PAGE_STATE_FLAG_CYCLE_ENABLED)) {
|
if (pageState.pageChanging && (pageState.pageFlags & PAGE_STATE_FLAG_CYCLE_ENABLED)) {
|
||||||
pageState.cycleIndex++;
|
pageState.cycleIndex++;
|
||||||
pageState.cycleIndex = pageState.cycleIndex % CYCLE_PAGE_ID_COUNT;
|
pageState.cycleIndex = pageState.cycleIndex % CYCLE_PAGE_ID_COUNT;
|
||||||
|
@ -511,9 +497,9 @@ void displayInit(rxConfig_t *rxConfigToUse)
|
||||||
displaySetNextPageChangeAt(micros() + (1000 * 1000 * 5));
|
displaySetNextPageChangeAt(micros() + (1000 * 1000 * 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
void displayShowFixedPage(void)
|
void displayShowFixedPage(pageId_e pageId)
|
||||||
{
|
{
|
||||||
displaySetPage(PAGE_GPS);
|
displaySetPage(pageId);
|
||||||
displayDisablePageCycling();
|
displayDisablePageCycling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,23 @@
|
||||||
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
PAGE_WELCOME,
|
||||||
|
PAGE_ARMED,
|
||||||
|
PAGE_BATTERY,
|
||||||
|
PAGE_SENSORS,
|
||||||
|
PAGE_RX,
|
||||||
|
PAGE_PROFILE,
|
||||||
|
PAGE_GPS
|
||||||
|
#ifdef ENABLE_DEBUG_OLED_PAGE
|
||||||
|
,
|
||||||
|
PAGE_DEBUG
|
||||||
|
#endif
|
||||||
|
} pageId_e;
|
||||||
|
|
||||||
void updateDisplay(void);
|
void updateDisplay(void);
|
||||||
|
|
||||||
void displayShowFixedPage(void);
|
void displayShowFixedPage(pageId_e pageId);
|
||||||
|
|
||||||
void displayEnablePageCycling(void);
|
void displayEnablePageCycling(void);
|
||||||
void displayDisablePageCycling(void);
|
void displayDisablePageCycling(void);
|
||||||
|
|
|
@ -360,8 +360,11 @@ void init(void)
|
||||||
|
|
||||||
#ifdef DISPLAY
|
#ifdef DISPLAY
|
||||||
if (feature(FEATURE_DISPLAY)) {
|
if (feature(FEATURE_DISPLAY)) {
|
||||||
//displayEnablePageCycling();
|
#ifdef USE_OLED_GPS_DEBUG_PAGE_ONLY
|
||||||
displayShowFixedPage();
|
displayShowFixedPage(PAGE_GPS);
|
||||||
|
#else
|
||||||
|
displayEnablePageCycling();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue