From 960ef5e9b99f521f9d4b44dcc403d2153d30a284 Mon Sep 17 00:00:00 2001 From: Pawel Jalocha Date: Tue, 7 Jul 2020 01:48:36 +0100 Subject: [PATCH] Make the selection of the displayed pages a parameter stored in flash: PageMask --- main/disp.cpp | 7 ++++--- main/parameters.h | 14 +++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/main/disp.cpp b/main/disp.cpp index 77f6a25..b881b48 100644 --- a/main/disp.cpp +++ b/main/disp.cpp @@ -166,9 +166,10 @@ void vTaskDISP(void* pvParameters) // else // #endif // skip not enabled pages - while ( (U8G2_OLED_PAGES_ENABLED & (1 << DISP_Page)) == 0 ) { - DISP_Page++; - if(DISP_Page>=DISP_Pages) DISP_Page=0; + if(Parameters.PageMask) + { while( ((Parameters.PageMask>>DISP_Page)&1) == 0 ) + { DISP_Page++; + if(DISP_Page>=DISP_Pages) DISP_Page=0; } } #ifdef DEBUG_PRINT diff --git a/main/parameters.h b/main/parameters.h index 2ef250b..976e414 100644 --- a/main/parameters.h +++ b/main/parameters.h @@ -100,6 +100,8 @@ class FlashParameters // char Copilot[16] // char Category[16] + uint32_t PageMask; + #ifdef WITH_BT_SPP char BTname[16]; // char BTpin[16]; @@ -198,6 +200,7 @@ class FlashParameters #endif for(uint8_t Idx=0; Idx