Page info in footer line
This commit is contained in:
parent
154fc108a0
commit
f73ccfbe5c
|
@ -165,9 +165,9 @@ public:
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -194,9 +194,9 @@ class PageBME280 : public Page
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -320,9 +320,9 @@ public:
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -267,9 +267,9 @@ class PageDST810 : public Page
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -307,9 +307,9 @@ class PageForValues : public Page
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -307,9 +307,9 @@ class PageForValues2 : public Page
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -117,9 +117,9 @@ class PageOneValue : public Page{
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -246,9 +246,9 @@ class PageThreeValues : public Page
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -184,9 +184,9 @@ class PageTwoValues : public Page
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -149,9 +149,9 @@ public:
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -339,9 +339,9 @@ public:
|
||||||
// Key Layout
|
// Key Layout
|
||||||
display.setTextColor(textcolor);
|
display.setTextColor(textcolor);
|
||||||
display.setFont(&Ubuntu_Bold8pt7b);
|
display.setFont(&Ubuntu_Bold8pt7b);
|
||||||
display.setCursor(115, 290);
|
display.setCursor(130, 290);
|
||||||
if(keylock == false){
|
if(keylock == false){
|
||||||
display.print(" [ <<<<<< >>>>>> ]");
|
display.print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]");
|
||||||
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
if(String(backlightMode) == "Control by Key"){ // Key for illumination
|
||||||
display.setCursor(343, 290);
|
display.setCursor(343, 290);
|
||||||
display.print("[ILUM]");
|
display.print("[ILUM]");
|
||||||
|
|
|
@ -13,6 +13,8 @@ typedef struct{
|
||||||
} PageData;
|
} PageData;
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
|
int actpage = 0;
|
||||||
|
int maxpage = 0;
|
||||||
double batteryVoltage = 0;
|
double batteryVoltage = 0;
|
||||||
double batteryCurrent = 0;
|
double batteryCurrent = 0;
|
||||||
double batteryPower = 0;
|
double batteryPower = 0;
|
||||||
|
|
|
@ -502,6 +502,8 @@ void OBP60Task(GwApi *api){
|
||||||
LOG_DEBUG(GwLog::LOG,"obp60task: start mainloop");
|
LOG_DEBUG(GwLog::LOG,"obp60task: start mainloop");
|
||||||
int pageNumber=0;
|
int pageNumber=0;
|
||||||
int lastPage=pageNumber;
|
int lastPage=pageNumber;
|
||||||
|
commonData.data.actpage = pageNumber + 1;
|
||||||
|
commonData.data.maxpage = numPages;
|
||||||
bool delayedDisplayUpdate = false; // If select a new pages then make a delayed full display update
|
bool delayedDisplayUpdate = false; // If select a new pages then make a delayed full display update
|
||||||
long firststart = millis(); // First start
|
long firststart = millis(); // First start
|
||||||
long starttime0 = millis(); // Mainloop
|
long starttime0 = millis(); // Mainloop
|
||||||
|
@ -562,6 +564,8 @@ void OBP60Task(GwApi *api){
|
||||||
if (pageNumber >= numPages){
|
if (pageNumber >= numPages){
|
||||||
pageNumber = 0;
|
pageNumber = 0;
|
||||||
}
|
}
|
||||||
|
commonData.data.actpage = pageNumber + 1;
|
||||||
|
commonData.data.maxpage = numPages;
|
||||||
}
|
}
|
||||||
// #10 Swipe left
|
// #10 Swipe left
|
||||||
if (keyboardMessage == 10)
|
if (keyboardMessage == 10)
|
||||||
|
@ -570,6 +574,8 @@ void OBP60Task(GwApi *api){
|
||||||
if (pageNumber < 0){
|
if (pageNumber < 0){
|
||||||
pageNumber = numPages - 1;
|
pageNumber = numPages - 1;
|
||||||
}
|
}
|
||||||
|
commonData.data.actpage = pageNumber + 1;
|
||||||
|
commonData.data.maxpage = numPages;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
// #9 or #10 Refresh display befor start a new page if reshresh is enabled
|
// #9 or #10 Refresh display befor start a new page if reshresh is enabled
|
||||||
|
|
Loading…
Reference in New Issue