From ab8188ab83043444039153b29d4c2389036465e2 Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 07:45:09 +0000 Subject: [PATCH 01/13] new file: notes.txt fresh start, added notes.txt --- notes.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 notes.txt diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..e6448f6 --- /dev/null +++ b/notes.txt @@ -0,0 +1,17 @@ +git remote add upstream /url/to/original/repo +git fetch upstream +git checkout master +git reset --hard upstream/master +git push origin master --force + +https://github.com/norbert-walter/esp32-nmea2000-obp60 + + +cd /workspace/esp32-nmea2000-obp60 +bash /workspace/esp32-nmea2000-obp60/lib/obp60task/run + +Page beim OBP60 hinzufügen +1. Page unter /lib/obp60task/PageXXXX.cpp anlegen +2. Alle Page-Namen in PageXXXX.cpp auf den Namen der Datei setzen +3. In /lib/obp60task/obp60task.cpp ab Zeile 242 (registerAllPages) die Seite hinzufügen +4. In /lib/obp60task/config.json für jede Seite den neuen Seitentyp in die Liste aufnehmen. From 63fb67a828384a6a196806f11fd068562364e25a Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 07:51:29 +0000 Subject: [PATCH 02/13] new file: lib/obp60task/PageWindRose2.cpp modified: lib/obp60task/config.json modified: lib/obp60task/obp60task.cpp Added WindRose (identical to WindRose) --- lib/obp60task/PageWindRose2.cpp | 412 ++++++++++++++++++++++++++++++++ lib/obp60task/config.json | 20 +- lib/obp60task/obp60task.cpp | 2 + 3 files changed, 424 insertions(+), 10 deletions(-) create mode 100644 lib/obp60task/PageWindRose2.cpp diff --git a/lib/obp60task/PageWindRose2.cpp b/lib/obp60task/PageWindRose2.cpp new file mode 100644 index 0000000..07b2b3b --- /dev/null +++ b/lib/obp60task/PageWindRose2.cpp @@ -0,0 +1,412 @@ +#ifdef BOARD_OBP60S3 + +#include "Pagedata.h" +#include "OBP60Extensions.h" + +class PageWindRose2 : public Page +{ +bool keylock = false; // Keylock +int16_t lp = 80; // Pointer length + +public: + PageWindRose2(CommonData &common){ + common.logger->logDebug(GwLog::LOG,"Show PageWindRose2"); + } + + // Key functions + virtual int handleKey(int key){ + // Keylock function + if(key == 11){ // Code for keylock + keylock = !keylock; // Toggle keylock + return 0; // Commit the key + } + return key; + } + + virtual void displayPage(CommonData &commonData, PageData &pageData) + { + GwConfigHandler *config = commonData.config; + GwLog *logger=commonData.logger; + + static String svalue1old = ""; + static String unit1old = ""; + static String svalue2old = ""; + static String unit2old = ""; + static String svalue3old = ""; + static String unit3old = ""; + static String svalue4old = ""; + static String unit4old = ""; + static String svalue5old = ""; + static String unit5old = ""; + static String svalue6old = ""; + static String unit6old = ""; + + // Get config data + String lengthformat = config->getString(config->lengthFormat); + bool simulation = config->getBool(config->useSimuData); + String displaycolor = config->getString(config->displaycolor); + bool holdvalues = config->getBool(config->holdvalues); + String flashLED = config->getString(config->flashLED); + String backlightMode = config->getString(config->backlight); + + // Get boat values for AWA + GwApi::BoatValue *bvalue1 = pageData.values[0]; // First element in list (only one value by PageOneValue) + String name1 = xdrDelete(bvalue1->getName()); // Value name + name1 = name1.substring(0, 6); // String length limit for value name + double value1 = bvalue1->value; // Value as double in SI unit + bool valid1 = bvalue1->valid; // Valid information + value1 = formatValue(bvalue1, commonData).value;// Format only nesaccery for simulation data for pointer + String svalue1 = formatValue(bvalue1, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit1 = formatValue(bvalue1, commonData).unit; // Unit of value + if(valid1 == true){ + svalue1old = svalue1; // Save old value + unit1old = unit1; // Save old unit + } + + // Get boat values for AWS + GwApi::BoatValue *bvalue2 = pageData.values[1]; // First element in list (only one value by PageOneValue) + String name2 = xdrDelete(bvalue2->getName()); // Value name + name2 = name2.substring(0, 6); // String length limit for value name + double value2 = bvalue2->value; // Value as double in SI unit + bool valid2 = bvalue2->valid; // Valid information + String svalue2 = formatValue(bvalue2, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit2 = formatValue(bvalue2, commonData).unit; // Unit of value + if(valid2 == true){ + svalue2old = svalue2; // Save old value + unit2old = unit2; // Save old unit + } + + // Get boat values TWD + GwApi::BoatValue *bvalue3 = pageData.values[2]; // Second element in list (only one value by PageOneValue) + String name3 = xdrDelete(bvalue3->getName()); // Value name + name3 = name3.substring(0, 6); // String length limit for value name + double value3 = bvalue3->value; // Value as double in SI unit + bool valid3 = bvalue3->valid; // Valid information + String svalue3 = formatValue(bvalue3, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit3 = formatValue(bvalue3, commonData).unit; // Unit of value + if(valid3 == true){ + svalue3old = svalue3; // Save old value + unit3old = unit3; // Save old unit + } + + // Get boat values TWS + GwApi::BoatValue *bvalue4 = pageData.values[3]; // Second element in list (only one value by PageOneValue) + String name4 = xdrDelete(bvalue4->getName()); // Value name + name4 = name4.substring(0, 6); // String length limit for value name + double value4 = bvalue4->value; // Value as double in SI unit + bool valid4 = bvalue4->valid; // Valid information + String svalue4 = formatValue(bvalue4, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit4 = formatValue(bvalue4, commonData).unit; // Unit of value + if(valid4 == true){ + svalue4old = svalue4; // Save old value + unit4old = unit4; // Save old unit + } + + // Get boat values DBT + GwApi::BoatValue *bvalue5 = pageData.values[4]; // Second element in list (only one value by PageOneValue) + String name5 = xdrDelete(bvalue5->getName()); // Value name + name5 = name5.substring(0, 6); // String length limit for value name + double value5 = bvalue5->value; // Value as double in SI unit + bool valid5 = bvalue5->valid; // Valid information + String svalue5 = formatValue(bvalue5, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit5 = formatValue(bvalue5, commonData).unit; // Unit of value + if(valid5 == true){ + svalue5old = svalue5; // Save old value + unit5old = unit5; // Save old unit + } + + // Get boat values STW + GwApi::BoatValue *bvalue6 = pageData.values[5]; // Second element in list (only one value by PageOneValue) + String name6 = xdrDelete(bvalue6->getName()); // Value name + name6 = name6.substring(0, 6); // String length limit for value name + double value6 = bvalue6->value; // Value as double in SI unit + bool valid6 = bvalue6->valid; // Valid information + String svalue6 = formatValue(bvalue6, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit6 = formatValue(bvalue6, commonData).unit; // Unit of value + if(valid6 == true){ + svalue6old = svalue6; // Save old value + unit6old = unit6; // Save old unit + } + + // Optical warning by limit violation (unused) + if(String(flashLED) == "Limit Violation"){ + setBlinkingLED(false); + setFlashLED(false); + } + + // Logging boat values + if (bvalue1 == NULL) return; + LOG_DEBUG(GwLog::LOG,"Drawing at PageWindRose2, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4, name5.c_str(), value5, name6.c_str(), value6); + + // Draw page + //*********************************************************** + + // Set background color and text color + int textcolor = GxEPD_BLACK; + int pixelcolor = GxEPD_BLACK; + int bgcolor = GxEPD_WHITE; + if(displaycolor == "Normal"){ + textcolor = GxEPD_BLACK; + pixelcolor = GxEPD_BLACK; + bgcolor = GxEPD_WHITE; + } + else{ + textcolor = GxEPD_WHITE; + pixelcolor = GxEPD_WHITE; + bgcolor = GxEPD_BLACK; + } + // Set display in partial refresh mode + getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update + + // Show values AWA + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); + getdisplay().setCursor(10, 65); + getdisplay().print(svalue1); // Value + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(10, 95); + getdisplay().print(name1); // Name + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(10, 115); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit1); // Unit + } + else{ + getdisplay().print(unit1old); // Unit + } + + // Horizintal separator left + getdisplay().fillRect(0, 149, 60, 3, pixelcolor); + + // Show values AWS + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); + getdisplay().setCursor(10, 270); + getdisplay().print(svalue2); // Value + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(10, 220); + getdisplay().print(name2); // Name + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(10, 190); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit2); // Unit + } + else{ + getdisplay().print(unit2old); // Unit + } + + // Show values TWD + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); + getdisplay().setCursor(295, 65); + if(valid3 == true){ + getdisplay().print(abs(value3 * 180 / PI), 0); // Value + } + else{ + getdisplay().print("---"); // Value + } + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(335, 95); + getdisplay().print(name3); // Name + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(335, 115); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit3); // Unit + } + else{ + getdisplay().print(unit3old); // Unit + } + + // Horizintal separator right + getdisplay().fillRect(340, 149, 80, 3, pixelcolor); + + // Show values TWS + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); + getdisplay().setCursor(295, 270); + getdisplay().print(svalue4); // Value + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(335, 220); + getdisplay().print(name4); // Name + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(335, 190); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit4); // Unit + } + else{ + getdisplay().print(unit4old); // Unit + } + +//******************************************************************************************* + + // Draw wind rose + int rInstrument = 110; // Radius of grafic instrument + float pi = 3.141592; + + getdisplay().fillCircle(200, 150, rInstrument + 10, pixelcolor); // Outer circle + getdisplay().fillCircle(200, 150, rInstrument + 7, bgcolor); // Outer circle + getdisplay().fillCircle(200, 150, rInstrument - 10, pixelcolor); // Inner circle + getdisplay().fillCircle(200, 150, rInstrument - 13, bgcolor); // Inner circle + + for(int i=0; i<360; i=i+10) + { + // Scaling values + float x = 200 + (rInstrument-30)*sin(i/180.0*pi); // x-coordinate dots + float y = 150 - (rInstrument-30)*cos(i/180.0*pi); // y-coordinate cots + const char *ii = ""; + switch (i) + { + case 0: ii="0"; break; + case 30 : ii="30"; break; + case 60 : ii="60"; break; + case 90 : ii="90"; break; + case 120 : ii="120"; break; + case 150 : ii="150"; break; + case 180 : ii="180"; break; + case 210 : ii="210"; break; + case 240 : ii="240"; break; + case 270 : ii="270"; break; + case 300 : ii="300"; break; + case 330 : ii="330"; break; + default: break; + } + + // Print text centered on position x, y + int16_t x1, y1; // Return values of getTextBounds + uint16_t w, h; // Return values of getTextBounds + getdisplay().getTextBounds(ii, int(x), int(y), &x1, &y1, &w, &h); // Calc width of new string + getdisplay().setCursor(x-w/2, y+h/2); + if(i % 30 == 0){ + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().print(ii); + } + + // Draw sub scale with dots + float x1c = 200 + rInstrument*sin(i/180.0*pi); + float y1c = 150 - rInstrument*cos(i/180.0*pi); + getdisplay().fillCircle((int)x1c, (int)y1c, 2, pixelcolor); + float sinx=sin(i/180.0*pi); + float cosx=cos(i/180.0*pi); + + // Draw sub scale with lines (two triangles) + if(i % 30 == 0){ + float dx=2; // Line thickness = 2*dx+1 + float xx1 = -dx; + float xx2 = +dx; + float yy1 = -(rInstrument-10); + float yy2 = -(rInstrument+10); + getdisplay().fillTriangle(200+(int)(cosx*xx1-sinx*yy1),150+(int)(sinx*xx1+cosx*yy1), + 200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), + 200+(int)(cosx*xx1-sinx*yy2),150+(int)(sinx*xx1+cosx*yy2),pixelcolor); + getdisplay().fillTriangle(200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), + 200+(int)(cosx*xx1-sinx*yy2),150+(int)(sinx*xx1+cosx*yy2), + 200+(int)(cosx*xx2-sinx*yy2),150+(int)(sinx*xx2+cosx*yy2),pixelcolor); + } + } + + // Draw wind pointer + float startwidth = 8; // Start width of pointer + if(valid2 == true || holdvalues == true || simulation == true){ + float sinx=sin(value1); // Wind direction + float cosx=cos(value1); + // Normal pointer + // Pointer as triangle with center base 2*width + float xx1 = -startwidth; + float xx2 = startwidth; + float yy1 = -startwidth; + float yy2 = -(rInstrument-15); + getdisplay().fillTriangle(200+(int)(cosx*xx1-sinx*yy1),150+(int)(sinx*xx1+cosx*yy1), + 200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), + 200+(int)(cosx*0-sinx*yy2),150+(int)(sinx*0+cosx*yy2),pixelcolor); + // Inverted pointer + // Pointer as triangle with center base 2*width + float endwidth = 2; // End width of pointer + float ix1 = endwidth; + float ix2 = -endwidth; + float iy1 = -(rInstrument-15); + float iy2 = -endwidth; + getdisplay().fillTriangle(200+(int)(cosx*ix1-sinx*iy1),150+(int)(sinx*ix1+cosx*iy1), + 200+(int)(cosx*ix2-sinx*iy1),150+(int)(sinx*ix2+cosx*iy1), + 200+(int)(cosx*0-sinx*iy2),150+(int)(sinx*0+cosx*iy2),pixelcolor); + } + + // Center circle + getdisplay().fillCircle(200, 150, startwidth + 6, bgcolor); + getdisplay().fillCircle(200, 150, startwidth + 4, pixelcolor); + +//******************************************************************************************* + + // Show values DBT + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b); + getdisplay().setCursor(160, 200); + getdisplay().print(svalue5); // Value + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(190, 215); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit5); // Unit + } + else{ + getdisplay().print(unit5old); // Unit + } + + // Show values STW + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b); + getdisplay().setCursor(160, 130); + getdisplay().print(svalue6); // Value + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(190, 90); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit6); // Unit + } + else{ + getdisplay().print(unit6old); // Unit + } + + // Key Layout + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&Ubuntu_Bold8pt7b); + if(keylock == false){ + getdisplay().setCursor(130, 290); + getdisplay().print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]"); + if(String(backlightMode) == "Control by Key"){ // Key for illumination + getdisplay().setCursor(343, 290); + getdisplay().print("[ILUM]"); + } + } + else{ + getdisplay().setCursor(130, 290); + getdisplay().print(" [ Keylock active ]"); + } + + // Update display + getdisplay().nextPage(); // Partial update (fast) + }; +}; + +static Page *createPage(CommonData &common){ + return new PageWindRose2(common); +} +/** + * with the code below we make this page known to the PageTask + * we give it a type (name) that can be selected in the config + * we define which function is to be called + * and we provide the number of user parameters we expect (0 here) + * and will will provide the names of the fixed values we need + */ +PageDescription registerPageWindRose2( + "WindRose2", // Page name + createPage, // Action + 0, // Number of bus values depends on selection in Web configuration + {"AWA", "AWS", "TWD", "TWS", "DBT", "STW"}, // Bus values we need in the page + true // Show display header on/off +); + +#endif diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index 49484de..b6d63a9 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -876,7 +876,7 @@ "type": "list", "default": "Voltage", "description": "Type of page for page 1", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 1", "capabilities": { "obp60":"true" @@ -936,7 +936,7 @@ "type": "list", "default": "WindRose", "description": "Type of page for page 2", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 2", "capabilities": { "obp60":"true" @@ -997,7 +997,7 @@ "type": "list", "default": "OneValue", "description": "Type of page for page 3", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 3", "capabilities": { "obp60":"true" @@ -1058,7 +1058,7 @@ "type": "list", "default": "TwoValues", "description": "Type of page for page 4", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 4", "capabilities": { "obp60":"true" @@ -1119,7 +1119,7 @@ "type": "list", "default": "ThreeValues", "description": "Type of page for page 5", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 5", "capabilities": { "obp60":"true" @@ -1180,7 +1180,7 @@ "type": "list", "default": "FourValues", "description": "Type of page for page 6", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 6", "capabilities": { "obp60":"true" @@ -1241,7 +1241,7 @@ "type": "list", "default": "FourValues2", "description": "Type of page for page 7", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 7", "capabilities": { "obp60":"true" @@ -1302,7 +1302,7 @@ "type": "list", "default": "Clock", "description": "Type of page for page 8", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 8", "capabilities": { "obp60":"true" @@ -1363,7 +1363,7 @@ "type": "list", "default": "RollPitch", "description": "Type of page for page 9", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 9", "capabilities": { "obp60":"true" @@ -1424,7 +1424,7 @@ "type": "list", "default": "Battery2", "description": "Type of page for page 10", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 10", "capabilities": { "obp60":"true" diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index d6691b1..3d5d279 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -216,6 +216,8 @@ void registerAllPages(PageList &list){ list.add(®isterPageApparentWind); extern PageDescription registerPageWindRose; list.add(®isterPageWindRose); + extern PageDescription registerPageWindRose2; + list.add(®isterPageWindRose2); extern PageDescription registerPageVoltage; list.add(®isterPageVoltage); extern PageDescription registerPageDST810; From adacc3a34dd94ebe3246bf72be1fd72556b83618 Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 07:55:49 +0000 Subject: [PATCH 03/13] modified: lib/obp60task/PageWindRose2.cpp changed hardcoded values to COG and SOG --- lib/obp60task/PageWindRose2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/obp60task/PageWindRose2.cpp b/lib/obp60task/PageWindRose2.cpp index 07b2b3b..91b822d 100644 --- a/lib/obp60task/PageWindRose2.cpp +++ b/lib/obp60task/PageWindRose2.cpp @@ -405,7 +405,7 @@ PageDescription registerPageWindRose2( "WindRose2", // Page name createPage, // Action 0, // Number of bus values depends on selection in Web configuration - {"AWA", "AWS", "TWD", "TWS", "DBT", "STW"}, // Bus values we need in the page + {"AWA", "AWS", "COG", "SOG", "TWD", "TWS"}, // Bus values we need in the page true // Show display header on/off ); From e0a5677cd92e268ea6014abf42ea59c9abe6329a Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 08:32:53 +0000 Subject: [PATCH 04/13] added PageWindRoseFlex --- lib/obp60task/PageWindRoseFlex.cpp | 412 +++++++++++++++++++++++++++++ lib/obp60task/config.json | 52 +++- lib/obp60task/obp60task.cpp | 2 + 3 files changed, 452 insertions(+), 14 deletions(-) create mode 100644 lib/obp60task/PageWindRoseFlex.cpp diff --git a/lib/obp60task/PageWindRoseFlex.cpp b/lib/obp60task/PageWindRoseFlex.cpp new file mode 100644 index 0000000..b9a222e --- /dev/null +++ b/lib/obp60task/PageWindRoseFlex.cpp @@ -0,0 +1,412 @@ +#ifdef BOARD_OBP60S3 + +#include "Pagedata.h" +#include "OBP60Extensions.h" + +class PageWindRoseFlex : public Page +{ +bool keylock = false; // Keylock +int16_t lp = 80; // Pointer length + +public: + PageWindRoseFlex(CommonData &common){ + common.logger->logDebug(GwLog::LOG,"Show PageWindRoseFlex"); + } + + // Key functions + virtual int handleKey(int key){ + // Keylock function + if(key == 11){ // Code for keylock + keylock = !keylock; // Toggle keylock + return 0; // Commit the key + } + return key; + } + + virtual void displayPage(CommonData &commonData, PageData &pageData) + { + GwConfigHandler *config = commonData.config; + GwLog *logger=commonData.logger; + + static String svalue1old = ""; + static String unit1old = ""; + static String svalue2old = ""; + static String unit2old = ""; + static String svalue3old = ""; + static String unit3old = ""; + static String svalue4old = ""; + static String unit4old = ""; + static String svalue5old = ""; + static String unit5old = ""; + static String svalue6old = ""; + static String unit6old = ""; + + // Get config data + String lengthformat = config->getString(config->lengthFormat); + bool simulation = config->getBool(config->useSimuData); + String displaycolor = config->getString(config->displaycolor); + bool holdvalues = config->getBool(config->holdvalues); + String flashLED = config->getString(config->flashLED); + String backlightMode = config->getString(config->backlight); + + // Get boat values for AWA + GwApi::BoatValue *bvalue1 = pageData.values[0]; // First element in list (only one value by PageOneValue) + String name1 = xdrDelete(bvalue1->getName()); // Value name + name1 = name1.substring(0, 6); // String length limit for value name + double value1 = bvalue1->value; // Value as double in SI unit + bool valid1 = bvalue1->valid; // Valid information + value1 = formatValue(bvalue1, commonData).value;// Format only nesaccery for simulation data for pointer + String svalue1 = formatValue(bvalue1, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit1 = formatValue(bvalue1, commonData).unit; // Unit of value + if(valid1 == true){ + svalue1old = svalue1; // Save old value + unit1old = unit1; // Save old unit + } + + // Get boat values for AWS + GwApi::BoatValue *bvalue2 = pageData.values[1]; // First element in list (only one value by PageOneValue) + String name2 = xdrDelete(bvalue2->getName()); // Value name + name2 = name2.substring(0, 6); // String length limit for value name + double value2 = bvalue2->value; // Value as double in SI unit + bool valid2 = bvalue2->valid; // Valid information + String svalue2 = formatValue(bvalue2, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit2 = formatValue(bvalue2, commonData).unit; // Unit of value + if(valid2 == true){ + svalue2old = svalue2; // Save old value + unit2old = unit2; // Save old unit + } + + // Get boat values TWD + GwApi::BoatValue *bvalue3 = pageData.values[2]; // Second element in list (only one value by PageOneValue) + String name3 = xdrDelete(bvalue3->getName()); // Value name + name3 = name3.substring(0, 6); // String length limit for value name + double value3 = bvalue3->value; // Value as double in SI unit + bool valid3 = bvalue3->valid; // Valid information + String svalue3 = formatValue(bvalue3, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit3 = formatValue(bvalue3, commonData).unit; // Unit of value + if(valid3 == true){ + svalue3old = svalue3; // Save old value + unit3old = unit3; // Save old unit + } + + // Get boat values TWS + GwApi::BoatValue *bvalue4 = pageData.values[3]; // Second element in list (only one value by PageOneValue) + String name4 = xdrDelete(bvalue4->getName()); // Value name + name4 = name4.substring(0, 6); // String length limit for value name + double value4 = bvalue4->value; // Value as double in SI unit + bool valid4 = bvalue4->valid; // Valid information + String svalue4 = formatValue(bvalue4, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit4 = formatValue(bvalue4, commonData).unit; // Unit of value + if(valid4 == true){ + svalue4old = svalue4; // Save old value + unit4old = unit4; // Save old unit + } + + // Get boat values DBT + GwApi::BoatValue *bvalue5 = pageData.values[4]; // Second element in list (only one value by PageOneValue) + String name5 = xdrDelete(bvalue5->getName()); // Value name + name5 = name5.substring(0, 6); // String length limit for value name + double value5 = bvalue5->value; // Value as double in SI unit + bool valid5 = bvalue5->valid; // Valid information + String svalue5 = formatValue(bvalue5, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit5 = formatValue(bvalue5, commonData).unit; // Unit of value + if(valid5 == true){ + svalue5old = svalue5; // Save old value + unit5old = unit5; // Save old unit + } + + // Get boat values STW + GwApi::BoatValue *bvalue6 = pageData.values[5]; // Second element in list (only one value by PageOneValue) + String name6 = xdrDelete(bvalue6->getName()); // Value name + name6 = name6.substring(0, 6); // String length limit for value name + double value6 = bvalue6->value; // Value as double in SI unit + bool valid6 = bvalue6->valid; // Valid information + String svalue6 = formatValue(bvalue6, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places + String unit6 = formatValue(bvalue6, commonData).unit; // Unit of value + if(valid6 == true){ + svalue6old = svalue6; // Save old value + unit6old = unit6; // Save old unit + } + + // Optical warning by limit violation (unused) + if(String(flashLED) == "Limit Violation"){ + setBlinkingLED(false); + setFlashLED(false); + } + + // Logging boat values + if (bvalue1 == NULL) return; + LOG_DEBUG(GwLog::LOG,"Drawing at PageWindRoseFlex, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4, name5.c_str(), value5, name6.c_str(), value6); + + // Draw page + //*********************************************************** + + // Set background color and text color + int textcolor = GxEPD_BLACK; + int pixelcolor = GxEPD_BLACK; + int bgcolor = GxEPD_WHITE; + if(displaycolor == "Normal"){ + textcolor = GxEPD_BLACK; + pixelcolor = GxEPD_BLACK; + bgcolor = GxEPD_WHITE; + } + else{ + textcolor = GxEPD_WHITE; + pixelcolor = GxEPD_WHITE; + bgcolor = GxEPD_BLACK; + } + // Set display in partial refresh mode + getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update + + // Show values AWA + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); + getdisplay().setCursor(10, 65); + getdisplay().print(svalue1); // Value + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(10, 95); + getdisplay().print(name1); // Name + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(10, 115); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit1); // Unit + } + else{ + getdisplay().print(unit1old); // Unit + } + + // Horizintal separator left + getdisplay().fillRect(0, 149, 60, 3, pixelcolor); + + // Show values AWS + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); + getdisplay().setCursor(10, 270); + getdisplay().print(svalue2); // Value + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(10, 220); + getdisplay().print(name2); // Name + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(10, 190); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit2); // Unit + } + else{ + getdisplay().print(unit2old); // Unit + } + + // Show values TWD + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); + getdisplay().setCursor(295, 65); + if(valid3 == true){ + getdisplay().print(abs(value3 * 180 / PI), 0); // Value + } + else{ + getdisplay().print("---"); // Value + } + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(335, 95); + getdisplay().print(name3); // Name + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(335, 115); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit3); // Unit + } + else{ + getdisplay().print(unit3old); // Unit + } + + // Horizintal separator right + getdisplay().fillRect(340, 149, 80, 3, pixelcolor); + + // Show values TWS + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); + getdisplay().setCursor(295, 270); + getdisplay().print(svalue4); // Value + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(335, 220); + getdisplay().print(name4); // Name + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(335, 190); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit4); // Unit + } + else{ + getdisplay().print(unit4old); // Unit + } + +//******************************************************************************************* + + // Draw wind rose + int rInstrument = 110; // Radius of grafic instrument + float pi = 3.141592; + + getdisplay().fillCircle(200, 150, rInstrument + 10, pixelcolor); // Outer circle + getdisplay().fillCircle(200, 150, rInstrument + 7, bgcolor); // Outer circle + getdisplay().fillCircle(200, 150, rInstrument - 10, pixelcolor); // Inner circle + getdisplay().fillCircle(200, 150, rInstrument - 13, bgcolor); // Inner circle + + for(int i=0; i<360; i=i+10) + { + // Scaling values + float x = 200 + (rInstrument-30)*sin(i/180.0*pi); // x-coordinate dots + float y = 150 - (rInstrument-30)*cos(i/180.0*pi); // y-coordinate cots + const char *ii = ""; + switch (i) + { + case 0: ii="0"; break; + case 30 : ii="30"; break; + case 60 : ii="60"; break; + case 90 : ii="90"; break; + case 120 : ii="120"; break; + case 150 : ii="150"; break; + case 180 : ii="180"; break; + case 210 : ii="210"; break; + case 240 : ii="240"; break; + case 270 : ii="270"; break; + case 300 : ii="300"; break; + case 330 : ii="330"; break; + default: break; + } + + // Print text centered on position x, y + int16_t x1, y1; // Return values of getTextBounds + uint16_t w, h; // Return values of getTextBounds + getdisplay().getTextBounds(ii, int(x), int(y), &x1, &y1, &w, &h); // Calc width of new string + getdisplay().setCursor(x-w/2, y+h/2); + if(i % 30 == 0){ + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().print(ii); + } + + // Draw sub scale with dots + float x1c = 200 + rInstrument*sin(i/180.0*pi); + float y1c = 150 - rInstrument*cos(i/180.0*pi); + getdisplay().fillCircle((int)x1c, (int)y1c, 2, pixelcolor); + float sinx=sin(i/180.0*pi); + float cosx=cos(i/180.0*pi); + + // Draw sub scale with lines (two triangles) + if(i % 30 == 0){ + float dx=2; // Line thickness = 2*dx+1 + float xx1 = -dx; + float xx2 = +dx; + float yy1 = -(rInstrument-10); + float yy2 = -(rInstrument+10); + getdisplay().fillTriangle(200+(int)(cosx*xx1-sinx*yy1),150+(int)(sinx*xx1+cosx*yy1), + 200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), + 200+(int)(cosx*xx1-sinx*yy2),150+(int)(sinx*xx1+cosx*yy2),pixelcolor); + getdisplay().fillTriangle(200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), + 200+(int)(cosx*xx1-sinx*yy2),150+(int)(sinx*xx1+cosx*yy2), + 200+(int)(cosx*xx2-sinx*yy2),150+(int)(sinx*xx2+cosx*yy2),pixelcolor); + } + } + + // Draw wind pointer + float startwidth = 8; // Start width of pointer + if(valid2 == true || holdvalues == true || simulation == true){ + float sinx=sin(value1); // Wind direction + float cosx=cos(value1); + // Normal pointer + // Pointer as triangle with center base 2*width + float xx1 = -startwidth; + float xx2 = startwidth; + float yy1 = -startwidth; + float yy2 = -(rInstrument-15); + getdisplay().fillTriangle(200+(int)(cosx*xx1-sinx*yy1),150+(int)(sinx*xx1+cosx*yy1), + 200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), + 200+(int)(cosx*0-sinx*yy2),150+(int)(sinx*0+cosx*yy2),pixelcolor); + // Inverted pointer + // Pointer as triangle with center base 2*width + float endwidth = 2; // End width of pointer + float ix1 = endwidth; + float ix2 = -endwidth; + float iy1 = -(rInstrument-15); + float iy2 = -endwidth; + getdisplay().fillTriangle(200+(int)(cosx*ix1-sinx*iy1),150+(int)(sinx*ix1+cosx*iy1), + 200+(int)(cosx*ix2-sinx*iy1),150+(int)(sinx*ix2+cosx*iy1), + 200+(int)(cosx*0-sinx*iy2),150+(int)(sinx*0+cosx*iy2),pixelcolor); + } + + // Center circle + getdisplay().fillCircle(200, 150, startwidth + 6, bgcolor); + getdisplay().fillCircle(200, 150, startwidth + 4, pixelcolor); + +//******************************************************************************************* + + // Show values DBT + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b); + getdisplay().setCursor(160, 200); + getdisplay().print(svalue5); // Value + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(190, 215); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit5); // Unit + } + else{ + getdisplay().print(unit5old); // Unit + } + + // Show values STW + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b); + getdisplay().setCursor(160, 130); + getdisplay().print(svalue6); // Value + getdisplay().setFont(&Ubuntu_Bold8pt7b); + getdisplay().setCursor(190, 90); + getdisplay().print(" "); + if(holdvalues == false){ + getdisplay().print(unit6); // Unit + } + else{ + getdisplay().print(unit6old); // Unit + } + + // Key Layout + getdisplay().setTextColor(textcolor); + getdisplay().setFont(&Ubuntu_Bold8pt7b); + if(keylock == false){ + getdisplay().setCursor(130, 290); + getdisplay().print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]"); + if(String(backlightMode) == "Control by Key"){ // Key for illumination + getdisplay().setCursor(343, 290); + getdisplay().print("[ILUM]"); + } + } + else{ + getdisplay().setCursor(130, 290); + getdisplay().print(" [ Keylock active ]"); + } + + // Update display + getdisplay().nextPage(); // Partial update (fast) + }; +}; + +static Page *createPage(CommonData &common){ + return new PageWindRoseFlex(common); +} +/** + * with the code below we make this page known to the PageTask + * we give it a type (name) that can be selected in the config + * we define which function is to be called + * and we provide the number of user parameters we expect (0 here) + * and will will provide the names of the fixed values we need + */ +PageDescription registerPageWindRoseFlex( + "WindRoseFlex", // Page name + createPage, // Action + 6, // Number of bus values depends on selection in Web configuration + //{"AWA", "AWS", "COG", "SOG", "TWD", "TWS"}, // Bus values we need in the page + true // Show display header on/off +); + +#endif diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index b6d63a9..f10f2e3 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -876,7 +876,7 @@ "type": "list", "default": "Voltage", "description": "Type of page for page 1", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 1", "capabilities": { "obp60":"true" @@ -892,7 +892,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"OneValue"},{"page1type":"TwoValues"},{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"}] + "condition":[{"page1type":"OneValue"},{"page1type":"TwoValues"},{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRodseFlex"}] }, { "name": "page1value2", @@ -904,7 +904,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"TwoValues"},{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"}] + "condition":[{"page1type":"TwoValues"},{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRodseFlex"}] }, { "name": "page1value3", @@ -916,7 +916,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"}] + "condition":[{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRodseFlex"}] }, { "name": "page1value4", @@ -928,7 +928,31 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"FourValues"},{"page1type":"FourValues2"}] + "condition":[{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRodseFlex"}] + }, + { + "name": "page1value5", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field 4", + "category": "OBP60 Page 1", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page1type":"WindRodseFlex"}] + }, + { + "name": "page1value6", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field 4", + "category": "OBP60 Page 1", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page1type":"WindRodseFlex"}] }, { "name": "page2type", @@ -936,7 +960,7 @@ "type": "list", "default": "WindRose", "description": "Type of page for page 2", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 2", "capabilities": { "obp60":"true" @@ -997,7 +1021,7 @@ "type": "list", "default": "OneValue", "description": "Type of page for page 3", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 3", "capabilities": { "obp60":"true" @@ -1058,7 +1082,7 @@ "type": "list", "default": "TwoValues", "description": "Type of page for page 4", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 4", "capabilities": { "obp60":"true" @@ -1119,7 +1143,7 @@ "type": "list", "default": "ThreeValues", "description": "Type of page for page 5", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 5", "capabilities": { "obp60":"true" @@ -1180,7 +1204,7 @@ "type": "list", "default": "FourValues", "description": "Type of page for page 6", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 6", "capabilities": { "obp60":"true" @@ -1241,7 +1265,7 @@ "type": "list", "default": "FourValues2", "description": "Type of page for page 7", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 7", "capabilities": { "obp60":"true" @@ -1302,7 +1326,7 @@ "type": "list", "default": "Clock", "description": "Type of page for page 8", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 8", "capabilities": { "obp60":"true" @@ -1363,7 +1387,7 @@ "type": "list", "default": "RollPitch", "description": "Type of page for page 9", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 9", "capabilities": { "obp60":"true" @@ -1424,7 +1448,7 @@ "type": "list", "default": "Battery2", "description": "Type of page for page 10", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 10", "capabilities": { "obp60":"true" diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index 3d5d279..99b1918 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -218,6 +218,8 @@ void registerAllPages(PageList &list){ list.add(®isterPageWindRose); extern PageDescription registerPageWindRose2; list.add(®isterPageWindRose2); + extern PageDescription registerPageWindRoseFlex; + list.add(®isterPageWindRoseFlex); extern PageDescription registerPageVoltage; list.add(®isterPageVoltage); extern PageDescription registerPageDST810; From 20130b624839b28b2859ee78e93c55d69547e969 Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 08:42:10 +0000 Subject: [PATCH 05/13] modified: lib/obp60task/config.json addes Data Fields 5 and 6 for all 10 Pages --- lib/obp60task/config.json | 226 +++++++++++++++++++++++++++++++++++++- 1 file changed, 221 insertions(+), 5 deletions(-) diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index f10f2e3..895203c 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -932,10 +932,10 @@ }, { "name": "page1value5", - "label": "Field 4", + "label": "Field 5", "type": "boatData", "default": "", - "description": "The display for field 4", + "description": "The display for field 5", "category": "OBP60 Page 1", "capabilities": { "obp60":"true" @@ -944,10 +944,10 @@ }, { "name": "page1value6", - "label": "Field 4", + "label": "Field 6", "type": "boatData", "default": "", - "description": "The display for field 4", + "description": "The display for field 6", "category": "OBP60 Page 1", "capabilities": { "obp60":"true" @@ -1015,6 +1015,30 @@ }, "condition":[{"page2type":"FourValues"},{"page2type":"FourValues2"}] }, + { + "name": "page2value5", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 2", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page2type":"WindRodseFlex"}] + }, + { + "name": "page2value6", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 2", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page2type":"WindRodseFlex"}] + }, { "name": "page3type", "label": "Type", @@ -1076,6 +1100,30 @@ }, "condition":[{"page3type":"FourValues"},{"page3type":"FourValues2"}] }, + { + "name": "page3value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 3", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page3type":"WindRodseFlex"}] + }, + { + "name": "page3value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 3", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page3type":"WindRodseFlex"}] + }, { "name": "page4type", "label": "Type", @@ -1137,6 +1185,30 @@ }, "condition":[{"page4type":"FourValues"},{"page4type":"FourValues2"}] }, + { + "name": "page4value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 4", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page4type":"WindRodseFlex"}] + }, + { + "name": "page4value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 4", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page4type":"WindRodseFlex"}] + }, { "name": "page5type", "label": "Type", @@ -1198,6 +1270,30 @@ }, "condition":[{"page5type":"FourValues"},{"page5type":"FourValues2"}] }, + { + "name": "page5value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 5", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page5type":"WindRodseFlex"}] + }, + { + "name": "page5value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 5", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page5type":"WindRodseFlex"}] + }, { "name": "page6type", "label": "Type", @@ -1259,6 +1355,30 @@ }, "condition":[{"page6type":"FourValues"},{"page6type":"FourValues2"}] }, + { + "name": "page6value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 6", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page6type":"WindRodseFlex"}] + }, + { + "name": "page6value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 6", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page6type":"WindRodseFlex"}] + }, { "name": "page7type", "label": "Type", @@ -1320,6 +1440,30 @@ }, "condition":[{"page7type":"FourValues"},{"page7type":"FourValues2"}] }, + { + "name": "page7value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 7", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page7type":"WindRodseFlex"}] + }, + { + "name": "page7value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 7", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page7type":"WindRodseFlex"}] + }, { "name": "page8type", "label": "Type", @@ -1381,6 +1525,30 @@ }, "condition":[{"page8type":"FourValues"},{"page8type":"FourValues2"}] }, + { + "name": "page8value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 8", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page8type":"WindRodseFlex"}] + }, + { + "name": "page8value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 8", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page8type":"WindRodseFlex"}] + }, { "name": "page9type", "label": "Type", @@ -1442,6 +1610,30 @@ }, "condition":[{"page9type":"FourValues"},{"page9type":"FourValues2"}] }, + { + "name": "page9value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 9", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page9type":"WindRodseFlex"}] + }, + { + "name": "page9value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 9", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page9type":"WindRodseFlex"}] + }, { "name": "page10type", "label": "Type", @@ -1502,5 +1694,29 @@ "obp60":"true" }, "condition":[{"page10type":"FourValues"},{"page10type":"FourValues2"}] - } + }, + { + "name": "page10value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field 5", + "category": "OBP60 Page 10", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page1type":"WindRodseFlex"}] + }, + { + "name": "page10value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field 6", + "category": "OBP60 Page 10", + "capabilities": { + "obp60":"true" + }, + "condition":[{"page10type":"WindRodseFlex"}] + } ] From 4bef5fddd30047ae58fc89be65510857720de581 Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 09:04:08 +0000 Subject: [PATCH 06/13] modified: lib/obp60task/obp60task.cpp --- lib/obp60task/obp60task.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index 99b1918..d79fcf5 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -219,7 +219,7 @@ void registerAllPages(PageList &list){ extern PageDescription registerPageWindRose2; list.add(®isterPageWindRose2); extern PageDescription registerPageWindRoseFlex; - list.add(®isterPageWindRoseFlex); + list.add(®isterPageWindRoseFlex); // extern PageDescription registerPageVoltage; list.add(®isterPageVoltage); extern PageDescription registerPageDST810; From 2c23517ad627458017e87fadf46e68ba89205fc5 Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 09:18:13 +0000 Subject: [PATCH 07/13] modified: lib/obp60task/config.json Fixed errors in Page numbers --- lib/obp60task/config.json | 74 +++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index 895203c..7bd348f 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -977,7 +977,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"OneValue"},{"page2type":"TwoValues"},{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"}] + "condition":[{"page2type":"OneValue"},{"page2type":"TwoValues"},{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRodseFlex"}] }, { "name": "page2value2", @@ -989,7 +989,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"TwoValues"},{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"}] + "condition":[{"page2type":"TwoValues"},{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRodseFlex"}] }, { "name": "page2value3", @@ -1001,7 +1001,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"}] + "condition":[{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRodseFlex"}] }, { "name": "page2value4", @@ -1013,7 +1013,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"FourValues"},{"page2type":"FourValues2"}] + "condition":[{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRodseFlex"}] }, { "name": "page2value5", @@ -1062,7 +1062,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"OneValue"},{"page3type":"TwoValues"},{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"}] + "condition":[{"page3type":"OneValue"},{"page3type":"TwoValues"},{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRodseFlex"}] }, { "name": "page3value2", @@ -1074,7 +1074,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"TwoValues"},{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"}] + "condition":[{"page3type":"TwoValues"},{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRodseFlex"}] }, { "name": "page3value3", @@ -1086,7 +1086,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"}] + "condition":[{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRodseFlex"}] }, { "name": "page3value4", @@ -1098,7 +1098,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"FourValues"},{"page3type":"FourValues2"}] + "condition":[{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRodseFlex"}] }, { "name": "page3value5", @@ -1147,7 +1147,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"OneValue"},{"page4type":"TwoValues"},{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"}] + "condition":[{"page4type":"OneValue"},{"page4type":"TwoValues"},{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRodseFlex"}] }, { "name": "page4value2", @@ -1159,7 +1159,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"TwoValues"},{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"}] + "condition":[{"page4type":"TwoValues"},{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRodseFlex"}] }, { "name": "page4value3", @@ -1171,7 +1171,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"}] + "condition":[{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRodseFlex"}] }, { "name": "page4value4", @@ -1183,7 +1183,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"FourValues"},{"page4type":"FourValues2"}] + "condition":[{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRodseFlex"}] }, { "name": "page4value5", @@ -1232,7 +1232,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"OneValue"},{"page5type":"TwoValues"},{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"}] + "condition":[{"page5type":"OneValue"},{"page5type":"TwoValues"},{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page4type":"WindRodseFlex"}] }, { "name": "page5value2", @@ -1244,7 +1244,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"TwoValues"},{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"}] + "condition":[{"page5type":"TwoValues"},{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page4type":"WindRodseFlex"}] }, { "name": "page5value3", @@ -1256,7 +1256,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"}] + "condition":[{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page5type":"WindRodseFlex"}] }, { "name": "page5value4", @@ -1268,7 +1268,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"FourValues"},{"page5type":"FourValues2"}] + "condition":[{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page5type":"WindRodseFlex"}] }, { "name": "page5value5", @@ -1317,7 +1317,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"OneValue"},{"page6type":"TwoValues"},{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"}] + "condition":[{"page6type":"OneValue"},{"page6type":"TwoValues"},{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRodseFlex"}] }, { "name": "page6value2", @@ -1329,7 +1329,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"TwoValues"},{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"}] + "condition":[{"page6type":"TwoValues"},{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRodseFlex"}] }, { "name": "page6value3", @@ -1341,7 +1341,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"}] + "condition":[{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRodseFlex"}] }, { "name": "page6value4", @@ -1353,7 +1353,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"FourValues"},{"page6type":"FourValues2"}] + "condition":[{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRodseFlex"}] }, { "name": "page6value5", @@ -1402,7 +1402,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"OneValue"},{"page7type":"TwoValues"},{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"}] + "condition":[{"page7type":"OneValue"},{"page7type":"TwoValues"},{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRodseFlex"}] }, { "name": "page7value2", @@ -1414,7 +1414,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"TwoValues"},{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"}] + "condition":[{"page7type":"TwoValues"},{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRodseFlex"}] }, { "name": "page7value3", @@ -1426,7 +1426,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"}] + "condition":[{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRodseFlex"}] }, { "name": "page7value4", @@ -1438,7 +1438,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"FourValues"},{"page7type":"FourValues2"}] + "condition":[{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRodseFlex"}] }, { "name": "page7value5", @@ -1487,7 +1487,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"OneValue"},{"page8type":"TwoValues"},{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"}] + "condition":[{"page8type":"OneValue"},{"page8type":"TwoValues"},{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRodseFlex"}] }, { "name": "page8value2", @@ -1499,7 +1499,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"TwoValues"},{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"}] + "condition":[{"page8type":"TwoValues"},{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRodseFlex"}] }, { "name": "page8value3", @@ -1511,7 +1511,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"}] + "condition":[{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRodseFlex"}] }, { "name": "page8value4", @@ -1523,7 +1523,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"FourValues"},{"page8type":"FourValues2"}] + "condition":[{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page88type":"WindRodseFlex"}] }, { "name": "page8value5", @@ -1572,7 +1572,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"OneValue"},{"page9type":"TwoValues"},{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"}] + "condition":[{"page9type":"OneValue"},{"page9type":"TwoValues"},{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRodseFlex"}] }, { "name": "page9value2", @@ -1584,7 +1584,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"TwoValues"},{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"}] + "condition":[{"page9type":"TwoValues"},{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRodseFlex"}] }, { "name": "page9value3", @@ -1596,7 +1596,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"}] + "condition":[{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRodseFlex"}] }, { "name": "page9value4", @@ -1608,7 +1608,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"FourValues"},{"page9type":"FourValues2"}] + "condition":[{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRodseFlex"}] }, { "name": "page9value5", @@ -1657,7 +1657,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"OneValue"},{"page10type":"TwoValues"},{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"}] + "condition":[{"page10type":"OneValue"},{"page10type":"TwoValues"},{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRodseFlex"}] }, { "name": "page10value2", @@ -1669,7 +1669,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"TwoValues"},{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"}] + "condition":[{"page10type":"TwoValues"},{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRodseFlex"}] }, { "name": "page10value3", @@ -1681,7 +1681,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"}] + "condition":[{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRodseFlex"}] }, { "name": "page10value4", @@ -1693,7 +1693,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"FourValues"},{"page10type":"FourValues2"}] + "condition":[{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRodseFlex"}] }, { "name": "page10value5", @@ -1705,7 +1705,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"WindRodseFlex"}] + "condition":[{"page10type":"WindRodseFlex"}] }, { "name": "page10value6", From 62bcfbbbcdb673f1baf53ee4e043d879a37660c3 Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 09:25:01 +0000 Subject: [PATCH 08/13] modified: lib/obp60task/PageWindRoseFlex.cpp --- lib/obp60task/PageWindRoseFlex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/obp60task/PageWindRoseFlex.cpp b/lib/obp60task/PageWindRoseFlex.cpp index b9a222e..1d708f1 100644 --- a/lib/obp60task/PageWindRoseFlex.cpp +++ b/lib/obp60task/PageWindRoseFlex.cpp @@ -404,7 +404,7 @@ static Page *createPage(CommonData &common){ PageDescription registerPageWindRoseFlex( "WindRoseFlex", // Page name createPage, // Action - 6, // Number of bus values depends on selection in Web configuration + 6, // Number of bus values depends on selection in Web configuration; was zero //{"AWA", "AWS", "COG", "SOG", "TWD", "TWS"}, // Bus values we need in the page true // Show display header on/off ); From 116deab9a46f71947c2215ba0518d300cd68c982 Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 09:26:19 +0000 Subject: [PATCH 09/13] modified: lib/obp60task/config.json Typo --- lib/obp60task/config.json | 120 +++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index 7bd348f..ff44942 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -892,7 +892,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"OneValue"},{"page1type":"TwoValues"},{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRodseFlex"}] + "condition":[{"page1type":"OneValue"},{"page1type":"TwoValues"},{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRoseFlex"}] }, { "name": "page1value2", @@ -904,7 +904,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"TwoValues"},{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRodseFlex"}] + "condition":[{"page1type":"TwoValues"},{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRoseFlex"}] }, { "name": "page1value3", @@ -916,7 +916,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRodseFlex"}] + "condition":[{"page1type":"ThreeValues"},{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRoseFlex"}] }, { "name": "page1value4", @@ -928,7 +928,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRodseFlex"}] + "condition":[{"page1type":"FourValues"},{"page1type":"FourValues2"},{"page1type":"WindRoseFlex"}] }, { "name": "page1value5", @@ -940,7 +940,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"WindRodseFlex"}] + "condition":[{"page1type":"WindRoseFlex"}] }, { "name": "page1value6", @@ -952,7 +952,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page1type":"WindRodseFlex"}] + "condition":[{"page1type":"WindRoseFlex"}] }, { "name": "page2type", @@ -977,7 +977,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"OneValue"},{"page2type":"TwoValues"},{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRodseFlex"}] + "condition":[{"page2type":"OneValue"},{"page2type":"TwoValues"},{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRoseFlex"}] }, { "name": "page2value2", @@ -989,7 +989,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"TwoValues"},{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRodseFlex"}] + "condition":[{"page2type":"TwoValues"},{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRoseFlex"}] }, { "name": "page2value3", @@ -1001,7 +1001,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRodseFlex"}] + "condition":[{"page2type":"ThreeValues"},{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRoseFlex"}] }, { "name": "page2value4", @@ -1013,7 +1013,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRodseFlex"}] + "condition":[{"page2type":"FourValues"},{"page2type":"FourValues2"},{"page2type":"WindRoseFlex"}] }, { "name": "page2value5", @@ -1025,7 +1025,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"WindRodseFlex"}] + "condition":[{"page2type":"WindRoseFlex"}] }, { "name": "page2value6", @@ -1037,7 +1037,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page2type":"WindRodseFlex"}] + "condition":[{"page2type":"WindRoseFlex"}] }, { "name": "page3type", @@ -1062,7 +1062,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"OneValue"},{"page3type":"TwoValues"},{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRodseFlex"}] + "condition":[{"page3type":"OneValue"},{"page3type":"TwoValues"},{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRoseFlex"}] }, { "name": "page3value2", @@ -1074,7 +1074,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"TwoValues"},{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRodseFlex"}] + "condition":[{"page3type":"TwoValues"},{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRoseFlex"}] }, { "name": "page3value3", @@ -1086,7 +1086,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRodseFlex"}] + "condition":[{"page3type":"ThreeValues"},{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRoseFlex"}] }, { "name": "page3value4", @@ -1098,7 +1098,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRodseFlex"}] + "condition":[{"page3type":"FourValues"},{"page3type":"FourValues2"},{"page3type":"WindRoseFlex"}] }, { "name": "page3value5", @@ -1110,7 +1110,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"WindRodseFlex"}] + "condition":[{"page3type":"WindRoseFlex"}] }, { "name": "page3value6", @@ -1122,7 +1122,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page3type":"WindRodseFlex"}] + "condition":[{"page3type":"WindRoseFlex"}] }, { "name": "page4type", @@ -1147,7 +1147,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"OneValue"},{"page4type":"TwoValues"},{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRodseFlex"}] + "condition":[{"page4type":"OneValue"},{"page4type":"TwoValues"},{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRoseFlex"}] }, { "name": "page4value2", @@ -1159,7 +1159,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"TwoValues"},{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRodseFlex"}] + "condition":[{"page4type":"TwoValues"},{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRoseFlex"}] }, { "name": "page4value3", @@ -1171,7 +1171,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRodseFlex"}] + "condition":[{"page4type":"ThreeValues"},{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRoseFlex"}] }, { "name": "page4value4", @@ -1183,7 +1183,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRodseFlex"}] + "condition":[{"page4type":"FourValues"},{"page4type":"FourValues2"},{"page4type":"WindRoseFlex"}] }, { "name": "page4value5", @@ -1195,7 +1195,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"WindRodseFlex"}] + "condition":[{"page4type":"WindRoseFlex"}] }, { "name": "page4value6", @@ -1207,7 +1207,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page4type":"WindRodseFlex"}] + "condition":[{"page4type":"WindRoseFlex"}] }, { "name": "page5type", @@ -1232,7 +1232,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"OneValue"},{"page5type":"TwoValues"},{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page4type":"WindRodseFlex"}] + "condition":[{"page5type":"OneValue"},{"page5type":"TwoValues"},{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page4type":"WindRoseFlex"}] }, { "name": "page5value2", @@ -1244,7 +1244,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"TwoValues"},{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page4type":"WindRodseFlex"}] + "condition":[{"page5type":"TwoValues"},{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page4type":"WindRoseFlex"}] }, { "name": "page5value3", @@ -1256,7 +1256,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page5type":"WindRodseFlex"}] + "condition":[{"page5type":"ThreeValues"},{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page5type":"WindRoseFlex"}] }, { "name": "page5value4", @@ -1268,7 +1268,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page5type":"WindRodseFlex"}] + "condition":[{"page5type":"FourValues"},{"page5type":"FourValues2"},{"page5type":"WindRoseFlex"}] }, { "name": "page5value5", @@ -1280,7 +1280,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"WindRodseFlex"}] + "condition":[{"page5type":"WindRoseFlex"}] }, { "name": "page5value6", @@ -1292,7 +1292,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page5type":"WindRodseFlex"}] + "condition":[{"page5type":"WindRoseFlex"}] }, { "name": "page6type", @@ -1317,7 +1317,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"OneValue"},{"page6type":"TwoValues"},{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRodseFlex"}] + "condition":[{"page6type":"OneValue"},{"page6type":"TwoValues"},{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRoseFlex"}] }, { "name": "page6value2", @@ -1329,7 +1329,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"TwoValues"},{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRodseFlex"}] + "condition":[{"page6type":"TwoValues"},{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRoseFlex"}] }, { "name": "page6value3", @@ -1341,7 +1341,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRodseFlex"}] + "condition":[{"page6type":"ThreeValues"},{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRoseFlex"}] }, { "name": "page6value4", @@ -1353,7 +1353,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRodseFlex"}] + "condition":[{"page6type":"FourValues"},{"page6type":"FourValues2"},{"page6type":"WindRoseFlex"}] }, { "name": "page6value5", @@ -1365,7 +1365,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"WindRodseFlex"}] + "condition":[{"page6type":"WindRoseFlex"}] }, { "name": "page6value6", @@ -1377,7 +1377,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page6type":"WindRodseFlex"}] + "condition":[{"page6type":"WindRoseFlex"}] }, { "name": "page7type", @@ -1402,7 +1402,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"OneValue"},{"page7type":"TwoValues"},{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRodseFlex"}] + "condition":[{"page7type":"OneValue"},{"page7type":"TwoValues"},{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRoseFlex"}] }, { "name": "page7value2", @@ -1414,7 +1414,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"TwoValues"},{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRodseFlex"}] + "condition":[{"page7type":"TwoValues"},{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRoseFlex"}] }, { "name": "page7value3", @@ -1426,7 +1426,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRodseFlex"}] + "condition":[{"page7type":"ThreeValues"},{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRoseFlex"}] }, { "name": "page7value4", @@ -1438,7 +1438,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRodseFlex"}] + "condition":[{"page7type":"FourValues"},{"page7type":"FourValues2"},{"page7type":"WindRoseFlex"}] }, { "name": "page7value5", @@ -1450,7 +1450,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"WindRodseFlex"}] + "condition":[{"page7type":"WindRoseFlex"}] }, { "name": "page7value6", @@ -1462,7 +1462,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page7type":"WindRodseFlex"}] + "condition":[{"page7type":"WindRoseFlex"}] }, { "name": "page8type", @@ -1487,7 +1487,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"OneValue"},{"page8type":"TwoValues"},{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRodseFlex"}] + "condition":[{"page8type":"OneValue"},{"page8type":"TwoValues"},{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRoseFlex"}] }, { "name": "page8value2", @@ -1499,7 +1499,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"TwoValues"},{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRodseFlex"}] + "condition":[{"page8type":"TwoValues"},{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRoseFlex"}] }, { "name": "page8value3", @@ -1511,7 +1511,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRodseFlex"}] + "condition":[{"page8type":"ThreeValues"},{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page8type":"WindRoseFlex"}] }, { "name": "page8value4", @@ -1523,7 +1523,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page88type":"WindRodseFlex"}] + "condition":[{"page8type":"FourValues"},{"page8type":"FourValues2"},{"page88type":"WindRoseFlex"}] }, { "name": "page8value5", @@ -1535,7 +1535,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"WindRodseFlex"}] + "condition":[{"page8type":"WindRoseFlex"}] }, { "name": "page8value6", @@ -1547,7 +1547,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page8type":"WindRodseFlex"}] + "condition":[{"page8type":"WindRoseFlex"}] }, { "name": "page9type", @@ -1572,7 +1572,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"OneValue"},{"page9type":"TwoValues"},{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRodseFlex"}] + "condition":[{"page9type":"OneValue"},{"page9type":"TwoValues"},{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRoseFlex"}] }, { "name": "page9value2", @@ -1584,7 +1584,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"TwoValues"},{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRodseFlex"}] + "condition":[{"page9type":"TwoValues"},{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRoseFlex"}] }, { "name": "page9value3", @@ -1596,7 +1596,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRodseFlex"}] + "condition":[{"page9type":"ThreeValues"},{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRoseFlex"}] }, { "name": "page9value4", @@ -1608,7 +1608,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRodseFlex"}] + "condition":[{"page9type":"FourValues"},{"page9type":"FourValues2"},{"page9type":"WindRoseFlex"}] }, { "name": "page9value5", @@ -1620,7 +1620,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"WindRodseFlex"}] + "condition":[{"page9type":"WindRoseFlex"}] }, { "name": "page9value6", @@ -1632,7 +1632,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page9type":"WindRodseFlex"}] + "condition":[{"page9type":"WindRoseFlex"}] }, { "name": "page10type", @@ -1657,7 +1657,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"OneValue"},{"page10type":"TwoValues"},{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRodseFlex"}] + "condition":[{"page10type":"OneValue"},{"page10type":"TwoValues"},{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRoseFlex"}] }, { "name": "page10value2", @@ -1669,7 +1669,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"TwoValues"},{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRodseFlex"}] + "condition":[{"page10type":"TwoValues"},{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRoseFlex"}] }, { "name": "page10value3", @@ -1681,7 +1681,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRodseFlex"}] + "condition":[{"page10type":"ThreeValues"},{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRoseFlex"}] }, { "name": "page10value4", @@ -1693,7 +1693,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRodseFlex"}] + "condition":[{"page10type":"FourValues"},{"page10type":"FourValues2"},{"page10type":"WindRoseFlex"}] }, { "name": "page10value5", @@ -1705,7 +1705,7 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"WindRodseFlex"}] + "condition":[{"page10type":"WindRoseFlex"}] }, { "name": "page10value6", @@ -1717,6 +1717,6 @@ "capabilities": { "obp60":"true" }, - "condition":[{"page10type":"WindRodseFlex"}] + "condition":[{"page10type":"WindRoseFlex"}] } ] From a76264dbab85fab0d2d7888222cf3c15632e724f Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 09:40:51 +0000 Subject: [PATCH 10/13] modified: lib/obp60task/config.json --- lib/obp60task/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index ff44942..baeeef7 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -884,7 +884,7 @@ }, { "name": "page1value1", - "label": "Field 1 ", + "label": "Field 1", "type": "boatData", "default": "", "description": "The display for field one", From 92da148f35a000b7546b1c1cea5416718304712d Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 09:59:14 +0000 Subject: [PATCH 11/13] modified: lib/obp60task/PageWindRoseFlex.cpp --- lib/obp60task/PageWindRoseFlex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/obp60task/PageWindRoseFlex.cpp b/lib/obp60task/PageWindRoseFlex.cpp index 1d708f1..f71018a 100644 --- a/lib/obp60task/PageWindRoseFlex.cpp +++ b/lib/obp60task/PageWindRoseFlex.cpp @@ -405,7 +405,7 @@ PageDescription registerPageWindRoseFlex( "WindRoseFlex", // Page name createPage, // Action 6, // Number of bus values depends on selection in Web configuration; was zero - //{"AWA", "AWS", "COG", "SOG", "TWD", "TWS"}, // Bus values we need in the page + //{"AWA", "AWS", "COG", "SOG", "TWD", "TWS"}, // Bus values we need in the page, modified for WindRose2 true // Show display header on/off ); From 19fd80128c3ea6811a6488a7e2e04b15010d754e Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 10:12:36 +0000 Subject: [PATCH 12/13] modified: lib/obp60task/config.json --- lib/obp60task/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index baeeef7..ecdc9f8 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -1017,7 +1017,7 @@ }, { "name": "page2value5", - "label": "Field 4", + "label": "Field 5", "type": "boatData", "default": "", "description": "The display for field 5", @@ -1029,7 +1029,7 @@ }, { "name": "page2value6", - "label": "Field 4", + "label": "Field 6", "type": "boatData", "default": "", "description": "The display for field 6", From c805adbc9de81762b7ba059db982789c3e9b6ec7 Mon Sep 17 00:00:00 2001 From: Tobias E Date: Sat, 26 Oct 2024 11:31:08 +0000 Subject: [PATCH 13/13] deleted: lib/obp60task/PageWindRose2.cpp modified: lib/obp60task/config.json modified: lib/obp60task/obp60task.cpp Cleanup, deleted PageWindRose2 --- lib/obp60task/PageWindRose2.cpp | 412 -------------------------------- lib/obp60task/config.json | 20 +- lib/obp60task/obp60task.cpp | 2 - 3 files changed, 10 insertions(+), 424 deletions(-) delete mode 100644 lib/obp60task/PageWindRose2.cpp diff --git a/lib/obp60task/PageWindRose2.cpp b/lib/obp60task/PageWindRose2.cpp deleted file mode 100644 index 91b822d..0000000 --- a/lib/obp60task/PageWindRose2.cpp +++ /dev/null @@ -1,412 +0,0 @@ -#ifdef BOARD_OBP60S3 - -#include "Pagedata.h" -#include "OBP60Extensions.h" - -class PageWindRose2 : public Page -{ -bool keylock = false; // Keylock -int16_t lp = 80; // Pointer length - -public: - PageWindRose2(CommonData &common){ - common.logger->logDebug(GwLog::LOG,"Show PageWindRose2"); - } - - // Key functions - virtual int handleKey(int key){ - // Keylock function - if(key == 11){ // Code for keylock - keylock = !keylock; // Toggle keylock - return 0; // Commit the key - } - return key; - } - - virtual void displayPage(CommonData &commonData, PageData &pageData) - { - GwConfigHandler *config = commonData.config; - GwLog *logger=commonData.logger; - - static String svalue1old = ""; - static String unit1old = ""; - static String svalue2old = ""; - static String unit2old = ""; - static String svalue3old = ""; - static String unit3old = ""; - static String svalue4old = ""; - static String unit4old = ""; - static String svalue5old = ""; - static String unit5old = ""; - static String svalue6old = ""; - static String unit6old = ""; - - // Get config data - String lengthformat = config->getString(config->lengthFormat); - bool simulation = config->getBool(config->useSimuData); - String displaycolor = config->getString(config->displaycolor); - bool holdvalues = config->getBool(config->holdvalues); - String flashLED = config->getString(config->flashLED); - String backlightMode = config->getString(config->backlight); - - // Get boat values for AWA - GwApi::BoatValue *bvalue1 = pageData.values[0]; // First element in list (only one value by PageOneValue) - String name1 = xdrDelete(bvalue1->getName()); // Value name - name1 = name1.substring(0, 6); // String length limit for value name - double value1 = bvalue1->value; // Value as double in SI unit - bool valid1 = bvalue1->valid; // Valid information - value1 = formatValue(bvalue1, commonData).value;// Format only nesaccery for simulation data for pointer - String svalue1 = formatValue(bvalue1, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places - String unit1 = formatValue(bvalue1, commonData).unit; // Unit of value - if(valid1 == true){ - svalue1old = svalue1; // Save old value - unit1old = unit1; // Save old unit - } - - // Get boat values for AWS - GwApi::BoatValue *bvalue2 = pageData.values[1]; // First element in list (only one value by PageOneValue) - String name2 = xdrDelete(bvalue2->getName()); // Value name - name2 = name2.substring(0, 6); // String length limit for value name - double value2 = bvalue2->value; // Value as double in SI unit - bool valid2 = bvalue2->valid; // Valid information - String svalue2 = formatValue(bvalue2, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places - String unit2 = formatValue(bvalue2, commonData).unit; // Unit of value - if(valid2 == true){ - svalue2old = svalue2; // Save old value - unit2old = unit2; // Save old unit - } - - // Get boat values TWD - GwApi::BoatValue *bvalue3 = pageData.values[2]; // Second element in list (only one value by PageOneValue) - String name3 = xdrDelete(bvalue3->getName()); // Value name - name3 = name3.substring(0, 6); // String length limit for value name - double value3 = bvalue3->value; // Value as double in SI unit - bool valid3 = bvalue3->valid; // Valid information - String svalue3 = formatValue(bvalue3, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places - String unit3 = formatValue(bvalue3, commonData).unit; // Unit of value - if(valid3 == true){ - svalue3old = svalue3; // Save old value - unit3old = unit3; // Save old unit - } - - // Get boat values TWS - GwApi::BoatValue *bvalue4 = pageData.values[3]; // Second element in list (only one value by PageOneValue) - String name4 = xdrDelete(bvalue4->getName()); // Value name - name4 = name4.substring(0, 6); // String length limit for value name - double value4 = bvalue4->value; // Value as double in SI unit - bool valid4 = bvalue4->valid; // Valid information - String svalue4 = formatValue(bvalue4, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places - String unit4 = formatValue(bvalue4, commonData).unit; // Unit of value - if(valid4 == true){ - svalue4old = svalue4; // Save old value - unit4old = unit4; // Save old unit - } - - // Get boat values DBT - GwApi::BoatValue *bvalue5 = pageData.values[4]; // Second element in list (only one value by PageOneValue) - String name5 = xdrDelete(bvalue5->getName()); // Value name - name5 = name5.substring(0, 6); // String length limit for value name - double value5 = bvalue5->value; // Value as double in SI unit - bool valid5 = bvalue5->valid; // Valid information - String svalue5 = formatValue(bvalue5, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places - String unit5 = formatValue(bvalue5, commonData).unit; // Unit of value - if(valid5 == true){ - svalue5old = svalue5; // Save old value - unit5old = unit5; // Save old unit - } - - // Get boat values STW - GwApi::BoatValue *bvalue6 = pageData.values[5]; // Second element in list (only one value by PageOneValue) - String name6 = xdrDelete(bvalue6->getName()); // Value name - name6 = name6.substring(0, 6); // String length limit for value name - double value6 = bvalue6->value; // Value as double in SI unit - bool valid6 = bvalue6->valid; // Valid information - String svalue6 = formatValue(bvalue6, commonData).svalue; // Formatted value as string including unit conversion and switching decimal places - String unit6 = formatValue(bvalue6, commonData).unit; // Unit of value - if(valid6 == true){ - svalue6old = svalue6; // Save old value - unit6old = unit6; // Save old unit - } - - // Optical warning by limit violation (unused) - if(String(flashLED) == "Limit Violation"){ - setBlinkingLED(false); - setFlashLED(false); - } - - // Logging boat values - if (bvalue1 == NULL) return; - LOG_DEBUG(GwLog::LOG,"Drawing at PageWindRose2, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4, name5.c_str(), value5, name6.c_str(), value6); - - // Draw page - //*********************************************************** - - // Set background color and text color - int textcolor = GxEPD_BLACK; - int pixelcolor = GxEPD_BLACK; - int bgcolor = GxEPD_WHITE; - if(displaycolor == "Normal"){ - textcolor = GxEPD_BLACK; - pixelcolor = GxEPD_BLACK; - bgcolor = GxEPD_WHITE; - } - else{ - textcolor = GxEPD_WHITE; - pixelcolor = GxEPD_WHITE; - bgcolor = GxEPD_BLACK; - } - // Set display in partial refresh mode - getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update - - // Show values AWA - getdisplay().setTextColor(textcolor); - getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); - getdisplay().setCursor(10, 65); - getdisplay().print(svalue1); // Value - getdisplay().setFont(&Ubuntu_Bold12pt7b); - getdisplay().setCursor(10, 95); - getdisplay().print(name1); // Name - getdisplay().setFont(&Ubuntu_Bold8pt7b); - getdisplay().setCursor(10, 115); - getdisplay().print(" "); - if(holdvalues == false){ - getdisplay().print(unit1); // Unit - } - else{ - getdisplay().print(unit1old); // Unit - } - - // Horizintal separator left - getdisplay().fillRect(0, 149, 60, 3, pixelcolor); - - // Show values AWS - getdisplay().setTextColor(textcolor); - getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); - getdisplay().setCursor(10, 270); - getdisplay().print(svalue2); // Value - getdisplay().setFont(&Ubuntu_Bold12pt7b); - getdisplay().setCursor(10, 220); - getdisplay().print(name2); // Name - getdisplay().setFont(&Ubuntu_Bold8pt7b); - getdisplay().setCursor(10, 190); - getdisplay().print(" "); - if(holdvalues == false){ - getdisplay().print(unit2); // Unit - } - else{ - getdisplay().print(unit2old); // Unit - } - - // Show values TWD - getdisplay().setTextColor(textcolor); - getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); - getdisplay().setCursor(295, 65); - if(valid3 == true){ - getdisplay().print(abs(value3 * 180 / PI), 0); // Value - } - else{ - getdisplay().print("---"); // Value - } - getdisplay().setFont(&Ubuntu_Bold12pt7b); - getdisplay().setCursor(335, 95); - getdisplay().print(name3); // Name - getdisplay().setFont(&Ubuntu_Bold8pt7b); - getdisplay().setCursor(335, 115); - getdisplay().print(" "); - if(holdvalues == false){ - getdisplay().print(unit3); // Unit - } - else{ - getdisplay().print(unit3old); // Unit - } - - // Horizintal separator right - getdisplay().fillRect(340, 149, 80, 3, pixelcolor); - - // Show values TWS - getdisplay().setTextColor(textcolor); - getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b); - getdisplay().setCursor(295, 270); - getdisplay().print(svalue4); // Value - getdisplay().setFont(&Ubuntu_Bold12pt7b); - getdisplay().setCursor(335, 220); - getdisplay().print(name4); // Name - getdisplay().setFont(&Ubuntu_Bold8pt7b); - getdisplay().setCursor(335, 190); - getdisplay().print(" "); - if(holdvalues == false){ - getdisplay().print(unit4); // Unit - } - else{ - getdisplay().print(unit4old); // Unit - } - -//******************************************************************************************* - - // Draw wind rose - int rInstrument = 110; // Radius of grafic instrument - float pi = 3.141592; - - getdisplay().fillCircle(200, 150, rInstrument + 10, pixelcolor); // Outer circle - getdisplay().fillCircle(200, 150, rInstrument + 7, bgcolor); // Outer circle - getdisplay().fillCircle(200, 150, rInstrument - 10, pixelcolor); // Inner circle - getdisplay().fillCircle(200, 150, rInstrument - 13, bgcolor); // Inner circle - - for(int i=0; i<360; i=i+10) - { - // Scaling values - float x = 200 + (rInstrument-30)*sin(i/180.0*pi); // x-coordinate dots - float y = 150 - (rInstrument-30)*cos(i/180.0*pi); // y-coordinate cots - const char *ii = ""; - switch (i) - { - case 0: ii="0"; break; - case 30 : ii="30"; break; - case 60 : ii="60"; break; - case 90 : ii="90"; break; - case 120 : ii="120"; break; - case 150 : ii="150"; break; - case 180 : ii="180"; break; - case 210 : ii="210"; break; - case 240 : ii="240"; break; - case 270 : ii="270"; break; - case 300 : ii="300"; break; - case 330 : ii="330"; break; - default: break; - } - - // Print text centered on position x, y - int16_t x1, y1; // Return values of getTextBounds - uint16_t w, h; // Return values of getTextBounds - getdisplay().getTextBounds(ii, int(x), int(y), &x1, &y1, &w, &h); // Calc width of new string - getdisplay().setCursor(x-w/2, y+h/2); - if(i % 30 == 0){ - getdisplay().setFont(&Ubuntu_Bold8pt7b); - getdisplay().print(ii); - } - - // Draw sub scale with dots - float x1c = 200 + rInstrument*sin(i/180.0*pi); - float y1c = 150 - rInstrument*cos(i/180.0*pi); - getdisplay().fillCircle((int)x1c, (int)y1c, 2, pixelcolor); - float sinx=sin(i/180.0*pi); - float cosx=cos(i/180.0*pi); - - // Draw sub scale with lines (two triangles) - if(i % 30 == 0){ - float dx=2; // Line thickness = 2*dx+1 - float xx1 = -dx; - float xx2 = +dx; - float yy1 = -(rInstrument-10); - float yy2 = -(rInstrument+10); - getdisplay().fillTriangle(200+(int)(cosx*xx1-sinx*yy1),150+(int)(sinx*xx1+cosx*yy1), - 200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), - 200+(int)(cosx*xx1-sinx*yy2),150+(int)(sinx*xx1+cosx*yy2),pixelcolor); - getdisplay().fillTriangle(200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), - 200+(int)(cosx*xx1-sinx*yy2),150+(int)(sinx*xx1+cosx*yy2), - 200+(int)(cosx*xx2-sinx*yy2),150+(int)(sinx*xx2+cosx*yy2),pixelcolor); - } - } - - // Draw wind pointer - float startwidth = 8; // Start width of pointer - if(valid2 == true || holdvalues == true || simulation == true){ - float sinx=sin(value1); // Wind direction - float cosx=cos(value1); - // Normal pointer - // Pointer as triangle with center base 2*width - float xx1 = -startwidth; - float xx2 = startwidth; - float yy1 = -startwidth; - float yy2 = -(rInstrument-15); - getdisplay().fillTriangle(200+(int)(cosx*xx1-sinx*yy1),150+(int)(sinx*xx1+cosx*yy1), - 200+(int)(cosx*xx2-sinx*yy1),150+(int)(sinx*xx2+cosx*yy1), - 200+(int)(cosx*0-sinx*yy2),150+(int)(sinx*0+cosx*yy2),pixelcolor); - // Inverted pointer - // Pointer as triangle with center base 2*width - float endwidth = 2; // End width of pointer - float ix1 = endwidth; - float ix2 = -endwidth; - float iy1 = -(rInstrument-15); - float iy2 = -endwidth; - getdisplay().fillTriangle(200+(int)(cosx*ix1-sinx*iy1),150+(int)(sinx*ix1+cosx*iy1), - 200+(int)(cosx*ix2-sinx*iy1),150+(int)(sinx*ix2+cosx*iy1), - 200+(int)(cosx*0-sinx*iy2),150+(int)(sinx*0+cosx*iy2),pixelcolor); - } - - // Center circle - getdisplay().fillCircle(200, 150, startwidth + 6, bgcolor); - getdisplay().fillCircle(200, 150, startwidth + 4, pixelcolor); - -//******************************************************************************************* - - // Show values DBT - getdisplay().setTextColor(textcolor); - getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b); - getdisplay().setCursor(160, 200); - getdisplay().print(svalue5); // Value - getdisplay().setFont(&Ubuntu_Bold8pt7b); - getdisplay().setCursor(190, 215); - getdisplay().print(" "); - if(holdvalues == false){ - getdisplay().print(unit5); // Unit - } - else{ - getdisplay().print(unit5old); // Unit - } - - // Show values STW - getdisplay().setTextColor(textcolor); - getdisplay().setFont(&DSEG7Classic_BoldItalic16pt7b); - getdisplay().setCursor(160, 130); - getdisplay().print(svalue6); // Value - getdisplay().setFont(&Ubuntu_Bold8pt7b); - getdisplay().setCursor(190, 90); - getdisplay().print(" "); - if(holdvalues == false){ - getdisplay().print(unit6); // Unit - } - else{ - getdisplay().print(unit6old); // Unit - } - - // Key Layout - getdisplay().setTextColor(textcolor); - getdisplay().setFont(&Ubuntu_Bold8pt7b); - if(keylock == false){ - getdisplay().setCursor(130, 290); - getdisplay().print("[ <<<< " + String(commonData.data.actpage) + "/" + String(commonData.data.maxpage) + " >>>> ]"); - if(String(backlightMode) == "Control by Key"){ // Key for illumination - getdisplay().setCursor(343, 290); - getdisplay().print("[ILUM]"); - } - } - else{ - getdisplay().setCursor(130, 290); - getdisplay().print(" [ Keylock active ]"); - } - - // Update display - getdisplay().nextPage(); // Partial update (fast) - }; -}; - -static Page *createPage(CommonData &common){ - return new PageWindRose2(common); -} -/** - * with the code below we make this page known to the PageTask - * we give it a type (name) that can be selected in the config - * we define which function is to be called - * and we provide the number of user parameters we expect (0 here) - * and will will provide the names of the fixed values we need - */ -PageDescription registerPageWindRose2( - "WindRose2", // Page name - createPage, // Action - 0, // Number of bus values depends on selection in Web configuration - {"AWA", "AWS", "COG", "SOG", "TWD", "TWS"}, // Bus values we need in the page - true // Show display header on/off -); - -#endif diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index ecdc9f8..4c04804 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -876,7 +876,7 @@ "type": "list", "default": "Voltage", "description": "Type of page for page 1", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 1", "capabilities": { "obp60":"true" @@ -960,7 +960,7 @@ "type": "list", "default": "WindRose", "description": "Type of page for page 2", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 2", "capabilities": { "obp60":"true" @@ -1045,7 +1045,7 @@ "type": "list", "default": "OneValue", "description": "Type of page for page 3", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 3", "capabilities": { "obp60":"true" @@ -1130,7 +1130,7 @@ "type": "list", "default": "TwoValues", "description": "Type of page for page 4", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 4", "capabilities": { "obp60":"true" @@ -1215,7 +1215,7 @@ "type": "list", "default": "ThreeValues", "description": "Type of page for page 5", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 5", "capabilities": { "obp60":"true" @@ -1300,7 +1300,7 @@ "type": "list", "default": "FourValues", "description": "Type of page for page 6", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 6", "capabilities": { "obp60":"true" @@ -1385,7 +1385,7 @@ "type": "list", "default": "FourValues2", "description": "Type of page for page 7", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 7", "capabilities": { "obp60":"true" @@ -1470,7 +1470,7 @@ "type": "list", "default": "Clock", "description": "Type of page for page 8", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 8", "capabilities": { "obp60":"true" @@ -1555,7 +1555,7 @@ "type": "list", "default": "RollPitch", "description": "Type of page for page 9", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 9", "capabilities": { "obp60":"true" @@ -1640,7 +1640,7 @@ "type": "list", "default": "Battery2", "description": "Type of page for page 10", - "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRose2","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], + "list":["OneValue","TwoValues","ThreeValues","FourValues","FourValues2","ApparentWind","WindRose","WindRoseFlex","Voltage","DST810","Clock","WhitePage","BME280","RudderPosition","KeelPosition","Battery","Battery2","RollPitch","Solar","Generator"], "category": "OBP60 Page 10", "capabilities": { "obp60":"true" diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index d79fcf5..76b4b0f 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -216,8 +216,6 @@ void registerAllPages(PageList &list){ list.add(®isterPageApparentWind); extern PageDescription registerPageWindRose; list.add(®isterPageWindRose); - extern PageDescription registerPageWindRose2; - list.add(®isterPageWindRose2); extern PageDescription registerPageWindRoseFlex; list.add(®isterPageWindRoseFlex); // extern PageDescription registerPageVoltage;