diff --git a/extra_script.py.new b/extra_script.py.new index b185a93..31ae608 100644 --- a/extra_script.py.new +++ b/extra_script.py.new @@ -520,9 +520,19 @@ prebuild(env) board="PLATFORM_BOARD_%s"%env["BOARD"].replace("-","_").upper() print("Board=#%s#"%board) print("BuildFlags=%s"%(" ".join(env["BUILD_FLAGS"]))) + +epdtype = "unknown" +pcbvers = "unknown" +for x in env["BUILD_FLAGS"]: + if x.startswith("-D HARDWARE_"): + pcbvers = x.split('_')[1] + if x.startswith("-D DISPLAY_"): + epdtype = x.split('_')[1] + env.Append( LINKFLAGS=[ "-u", "custom_app_desc" ], - CPPDEFINES=[(board,"1")] + CPPDEFINES=[(board,"1"), ("BOARD", env["BOARD"]), ("EPDTYPE", epdtype), + ("PCBVERS", pcbvers)] ) #script does not run on clean yet - maybe in the future env.AddPostAction("clean",cleangenerated) diff --git a/lib/obp60task/PageSystem.cpp b/lib/obp60task/PageSystem.cpp index 7f601a1..519bee1 100644 --- a/lib/obp60task/PageSystem.cpp +++ b/lib/obp60task/PageSystem.cpp @@ -6,19 +6,32 @@ #include #include "qrcode.h" +#ifdef BOARD_OBP40S3 +#include +#include +#endif + #define STRINGIZE_IMPL(x) #x #define STRINGIZE(x) STRINGIZE_IMPL(x) #define VERSINFO STRINGIZE(GWDEVVERSION) +#define BOARDINFO STRINGIZE(BOARD) +#define PCBINFO STRINGIZE(PCBVERS) +#define DISPLAYINFO STRINGIZE(EPDTYPE) /* * Special system page, called directly with fast key sequence 5,4 * Out of normal page order. + * Consists of some sub-pages with following content: + * 1. Hard and software information + * 2. System settings + * 3. NMEA2000 device list */ class PageSystem : public Page { uint64_t chipid; bool simulation; +bool sdcard; String buzzer_mode; uint8_t buzzer_power; String cpuspeed; @@ -26,7 +39,12 @@ String rtc_module; String gps_module; String env_module; -char mode = 'N'; // (N)ormal, (D)evice list +String batt_sensor; +String solar_sensor; +String gen_sensor; +String rot_sensor; + +char mode = 'N'; // (N)ormal, (S)ettings, (D)evice list, (C)ard public: PageSystem(CommonData &common){ @@ -37,12 +55,20 @@ public: } chipid = ESP.getEfuseMac(); simulation = common.config->getBool(common.config->useSimuData); +#ifdef BOARD_OBP40S3 + sdcard = common.config->getBool(common.config->useSDCard); +#endif buzzer_mode = common.config->getString(common.config->buzzerMode); + buzzer_mode.toLowerCase(); buzzer_power = common.config->getInt(common.config->buzzerPower); cpuspeed = common.config->getString(common.config->cpuSpeed); env_module = common.config->getString(common.config->useEnvSensor); rtc_module = common.config->getString(common.config->useRTC); gps_module = common.config->getString(common.config->useGPS); + batt_sensor = common.config->getString(common.config->usePowSensor1); + solar_sensor = common.config->getString(common.config->usePowSensor2); + gen_sensor = common.config->getString(common.config->usePowSensor3); + rot_sensor = common.config->getString(common.config->useRotSensor); } virtual void setupKeys(){ @@ -60,7 +86,15 @@ public: commonData->logger->logDebug(GwLog::LOG, "System keyboard handler"); if (key == 2) { if (mode == 'N') { + mode = 'S'; + } else if (mode == 'S') { mode = 'D'; + } else if (mode == 'D') { + if (sdcard) { + mode = 'C'; + } else { + mode = 'N'; + } } else { mode = 'N'; } @@ -105,12 +139,12 @@ public: // s is pixel size of a single box QRCode qrcode; uint8_t qrcodeData[qrcode_getBufferSize(4)]; - #ifdef BOARD_OBP40S3 +#ifdef BOARD_OBP40S3 String prefix = "OBP40:SN:"; - #endif - #ifdef BOARD_OBP60S3 +#endif +#ifdef BOARD_OBP60S3 String prefix = "OBP60:SN:"; - #endif +#endif qrcode_initText(&qrcode, qrcodeData, 4, 0, (prefix + serialno).c_str()); int16_t x0 = x; for (uint8_t j = 0; j < qrcode.size; j++) { @@ -144,101 +178,189 @@ public: // Draw page //*********************************************************** - const uint16_t y0 = 120; // data table starts here + uint16_t x0 = 8; // left column + uint16_t y0 = 48; // data table starts here // Set display in partial refresh mode getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update if (mode == 'N') { + getdisplay().setFont(&Ubuntu_Bold12pt7b); - getdisplay().setCursor(8, 50); + getdisplay().setCursor(8, 48); getdisplay().print("System Information"); getdisplay().drawXBitmap(320, 25, logo64_bits, logo64_width, logo64_height, commonData->fgcolor); getdisplay().setFont(&Ubuntu_Bold8pt7b); + y0 = 155; char ssid[13]; snprintf(ssid, 13, "%04X%08X", (uint16_t)(chipid >> 32), (uint32_t)chipid); displayBarcode(String(ssid), 320, 200, 2); getdisplay().setCursor(8, 70); - getdisplay().print(String("MUDEVICE-") + String(ssid)); + getdisplay().print(String("MCUDEVICE-") + String(ssid)); - getdisplay().setCursor(8, 90); - getdisplay().print("Firmware Version: "); + getdisplay().setCursor(8, 95); + getdisplay().print("Firmware version: "); + getdisplay().setCursor(160, 95); getdisplay().print(VERSINFO); + getdisplay().setCursor(8, 113); + getdisplay().print("Board version: "); + getdisplay().setCursor(160, 113); + getdisplay().print(BOARDINFO); + getdisplay().print(String(" HW ") + String(PCBINFO)); + + getdisplay().setCursor(8, 131); + getdisplay().print("Display version: "); + getdisplay().setCursor(160, 131); + getdisplay().print(DISPLAYINFO); + getdisplay().setCursor(8, 265); - #ifdef BOARD_OBP60S3 +#ifdef BOARD_OBP60S3 getdisplay().print("Press STBY to enter deep sleep mode"); - #endif - #ifdef BOARD_OBP40S3 +#endif +#ifdef BOARD_OBP40S3 getdisplay().print("Press wheel to enter deep sleep mode"); - #endif +#endif - getdisplay().setCursor(2, y0); - getdisplay().print("Simulation:"); - getdisplay().setCursor(120, y0); - getdisplay().print(simulation ? "on" : "off"); + // Flash memory size + uint32_t flash_size = ESP.getFlashChipSize(); + getdisplay().setCursor(8, y0); + getdisplay().print("FLASH:"); + getdisplay().setCursor(90, y0); + getdisplay().print(String(flash_size / 1024) + String(" kB")); - getdisplay().setCursor(2, y0 + 16); - getdisplay().print("Environment:"); - getdisplay().setCursor(120, y0 + 16); - getdisplay().print(env_module); - - // total RAM free - int Heap_free = esp_get_free_heap_size(); - getdisplay().setCursor(202, y0); - getdisplay().print("Total free:"); - getdisplay().setCursor(300, y0); - getdisplay().print(String(Heap_free)); - - getdisplay().setCursor(2, y0 + 32); - getdisplay().print("Buzzer:"); - getdisplay().setCursor(120, y0 + 32); - getdisplay().print(buzzer_mode); - - // RAM free for task - int RAM_free = uxTaskGetStackHighWaterMark(NULL); - getdisplay().setCursor(202, y0 + 16); - getdisplay().print("Task free:"); - getdisplay().setCursor(300, y0 + 16); - getdisplay().print(String(RAM_free)); + // PSRAM memory size + uint32_t psram_size = ESP.getPsramSize(); + getdisplay().setCursor(8, y0 + 16); + getdisplay().print("PSRAM:"); + getdisplay().setCursor(90, y0 + 16); + getdisplay().print(String(psram_size / 1024) + String(" kB")); // FRAM available / status - getdisplay().setCursor(202, y0 + 32); + getdisplay().setCursor(8, y0 + 32); getdisplay().print("FRAM:"); - getdisplay().setCursor(300, y0 + 32); + getdisplay().setCursor(90, y0 + 32); getdisplay().print(hasFRAM ? "available" : "not found"); - getdisplay().setCursor(202, y0 + 64); +#ifdef BOARD_OBP40S3 + // SD-Card + getdisplay().setCursor(8, y0 + 48); + getdisplay().print("SD-Card:"); + getdisplay().setCursor(90, y0 + 48); + if (sdcard) { + uint64_t cardsize = SD.cardSize() / (1024 * 1024); + getdisplay().print(String(cardsize) + String(" MB")); + } else { + getdisplay().print("off"); + } +#endif + + // CPU speed config / active + getdisplay().setCursor(202, y0); getdisplay().print("CPU speed:"); - getdisplay().setCursor(300, y0 + 64); + getdisplay().setCursor(300, y0); getdisplay().print(cpuspeed); getdisplay().print(" / "); int cpu_freq = esp_clk_cpu_freq() / 1000000; getdisplay().print(String(cpu_freq)); - getdisplay().setCursor(2, y0 + 64); + // total RAM free + int Heap_free = esp_get_free_heap_size(); + getdisplay().setCursor(202, y0 + 16); + getdisplay().print("Total free:"); + getdisplay().setCursor(300, y0 + 16); + getdisplay().print(String(Heap_free)); + + // RAM free for task + int RAM_free = uxTaskGetStackHighWaterMark(NULL); + getdisplay().setCursor(202, y0 + 32); + getdisplay().print("Task free:"); + getdisplay().setCursor(300, y0 + 32); + getdisplay().print(String(RAM_free)); + + } else if (mode == 'S') { + // Settings + + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(x0, 48); + getdisplay().print("System settings"); + + getdisplay().setFont(&Ubuntu_Bold8pt7b); + x0 = 8; + y0 = 72; + + // left column + getdisplay().setCursor(x0, y0); + getdisplay().print("Simulation:"); + getdisplay().setCursor(140, y0); + getdisplay().print(simulation ? "on" : "off"); + + getdisplay().setCursor(x0, y0 + 16); + getdisplay().print("Environment:"); + getdisplay().setCursor(140, y0 + 16); + getdisplay().print(env_module); + + getdisplay().setCursor(x0, y0 + 32); + getdisplay().print("Buzzer:"); + getdisplay().setCursor(140, y0 + 32); + getdisplay().print(buzzer_mode); + + getdisplay().setCursor(x0, y0 + 64); getdisplay().print("GPS:"); - getdisplay().setCursor(120, y0 + 64); + getdisplay().setCursor(140, y0 + 64); getdisplay().print(gps_module); - getdisplay().setCursor(2, y0 + 80); + getdisplay().setCursor(x0, y0 + 80); getdisplay().print("RTC:"); - getdisplay().setCursor(120, y0 + 80); + getdisplay().setCursor(140, y0 + 80); getdisplay().print(rtc_module); - getdisplay().setCursor(2, y0 + 96); + getdisplay().setCursor(x0, y0 + 96); getdisplay().print("Wifi:"); - getdisplay().setCursor(120, y0 + 96); - getdisplay().print(commonData->status.wifiApOn ? "On" : "Off"); + getdisplay().setCursor(140, y0 + 96); + getdisplay().print(commonData->status.wifiApOn ? "on" : "off"); + + // right column + getdisplay().setCursor(202, y0); + getdisplay().print("Batt. sensor:"); + getdisplay().setCursor(320, y0); + getdisplay().print(batt_sensor); + + // Solar sensor + getdisplay().setCursor(202, y0 + 16); + getdisplay().print("Solar sensor:"); + getdisplay().setCursor(320, y0 + 16); + getdisplay().print(solar_sensor); + + // Generator sensor + getdisplay().setCursor(202, y0 + 32); + getdisplay().print("Gen. sensor:"); + getdisplay().setCursor(320, y0 + 32); + getdisplay().print(gen_sensor); + + // Gyro sensor + + } else if (mode == 'C') { + // Card info + getdisplay().setFont(&Ubuntu_Bold12pt7b); + getdisplay().setCursor(8, 48); + getdisplay().print("SD Card info"); + + getdisplay().setFont(&Ubuntu_Bold8pt7b); + + x0 = 20; + y0 = 72; + getdisplay().setCursor(x0, y0); + getdisplay().print("Work in progress..."); } else { // NMEA2000 device list getdisplay().setFont(&Ubuntu_Bold12pt7b); - getdisplay().setCursor(20, 50); + getdisplay().setCursor(8, 48); getdisplay().print("NMEA2000 device list"); getdisplay().setFont(&Ubuntu_Bold8pt7b); diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index bf2aafc..2b5224b 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -16,7 +16,7 @@ "description": "NTP time server. Use only one hostname or IP address", "category": "wifi client", "capabilities": { - "obp40": "true" + "obp60": "true" } }, { @@ -1249,6 +1249,7 @@ "min": 1, "max": 10, "default":"10", + "description": "Number of visible data pages [1...10]", "category":"OBP60 Pages", "capabilities": { "obp60":"true" @@ -1262,6 +1263,7 @@ "min": 1, "max": 10, "default":"1", + "description": "First page number to display after device startup", "category":"OBP60 Pages", "capabilities": { "obp60":"true" diff --git a/lib/obp60task/config_obp40.json b/lib/obp60task/config_obp40.json index e24e9e9..a03b359 100644 --- a/lib/obp60task/config_obp40.json +++ b/lib/obp60task/config_obp40.json @@ -616,12 +616,8 @@ "name": "useSDCard", "label": "SD Card", "type": "boolean", - "default": "off", + "default": "false", "description": "Use internal SD card interface [off|on]", - "list": [ - "off", - "on" - ], "category": "OBP40 Hardware", "capabilities": { "obp40": "true" @@ -701,6 +697,189 @@ "obp40": "true" } }, + { + "name": "calInstance1", + "label": "Calibration Data Instance 1", + "type": "list", + "default": "---", + "description": "Data instance for calibration", + "list": [ + "---", + "AWA", + "AWS", + "DBT", + "HDM", + "PRPOS", + "RPOS", + "STW", + "TWA", + "TWS", + "TWD", + "WTemp" + ], + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calOffset1", + "label": "Data Instance 1 Calibration Offset", + "type": "number", + "default": "0.00", + "description": "Offset for data instance 1", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calSlope1", + "label": "Data Instance 1 Calibration Slope", + "type": "number", + "default": "1.00", + "description": "Slope for data instance 1", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calSmooth1", + "label": "Data Instance 1 Smoothing", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": 0, + "max": 10, + "description": "Smoothing factor for data instance 1", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calInstance2", + "label": "Calibration Data Instance 2", + "type": "list", + "default": "---", + "description": "Data instance for calibration", + "list": [ + "---", + "AWA", + "AWS", + "DBT", + "HDM", + "PRPOS", + "RPOS", + "STW", + "TWA", + "TWS", + "TWD", + "WTemp" + ], + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calOffset2", + "label": "Data Instance 2 Calibration Offset", + "type": "number", + "default": "0.00", + "description": "Offset for data instance 2", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calSlope2", + "label": "Data Instance 2 Calibration Slope", + "type": "number", + "default": "1.00", + "description": "Slope for data instance 2", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calSmooth2", + "label": "Data Instance 2 Smoothing", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": 0, + "max": 10, + "description": "Smoothing factor for data instance 2", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calInstance3", + "label": "Calibration Data Instance 3", + "type": "list", + "default": "---", + "description": "Data instance for calibration", + "list": [ + "---", + "AWA", + "AWS", + "DBT", + "HDM", + "PRPOS", + "RPOS", + "STW", + "TWA", + "TWS", + "TWD", + "WTemp" + ], + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calOffset3", + "label": "Data Instance 3 Calibration Offset", + "type": "number", + "default": "0.00", + "description": "Offset for data instance 3", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calSlope3", + "label": "Data Instance 3 Calibration Slope", + "type": "number", + "default": "1.00", + "description": "Slope for data instance 3", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "calSmooth3", + "label": "Data Instance 3 Smoothing", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": 0, + "max": 10, + "description": "Smoothing factor for data instance 3", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, { "name": "display", "label": "Display Mode", @@ -950,6 +1129,7 @@ "min": 1, "max": 10, "default":"10", + "description": "Number of visible data pages [1...10]", "category":"OBP40 Pages", "capabilities": { "obp40": "true" @@ -963,6 +1143,7 @@ "min": 1, "max": 10, "default":"1", + "description": "First page number to display after device startup", "category":"OBP40 Pages", "capabilities": { "obp40": "true" @@ -1015,6 +1196,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -1073,6 +1255,9 @@ "obp40": "true" }, "condition": [ + { + "page1type": "Fluid" + }, { "page1type": "FourValues" }, @@ -1085,6 +1270,9 @@ { "page1type": "RollPitch" }, + { + "page1type": "SixValues" + }, { "page1type": "ThreeValues" }, @@ -1093,9 +1281,6 @@ }, { "page1type": "WindRoseFlex" - }, - { - "page1type": "Fluid" } ] }, @@ -1119,6 +1304,9 @@ { "page1type": "RollPitch" }, + { + "page1type": "SixValues" + }, { "page1type": "ThreeValues" }, @@ -1147,6 +1335,9 @@ { "page1type": "FourValues2" }, + { + "page1type": "SixValues" + }, { "page1type": "ThreeValues" }, @@ -1172,6 +1363,9 @@ { "page1type": "FourValues2" }, + { + "page1type": "SixValues" + }, { "page1type": "WindRoseFlex" } @@ -1188,6 +1382,9 @@ "obp40": "true" }, "condition": [ + { + "page1type": "SixValues" + }, { "page1type": "WindRoseFlex" } @@ -1204,6 +1401,9 @@ "obp40": "true" }, "condition": [ + { + "page1type": "SixValues" + }, { "page1type": "WindRoseFlex" } @@ -1275,6 +1475,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -1330,6 +1531,9 @@ "obp40": "true" }, "condition": [ + { + "page2type": "Fluid" + }, { "page2type": "FourValues" }, @@ -1342,6 +1546,9 @@ { "page2type": "RollPitch" }, + { + "page2type": "SixValues" + }, { "page2type": "ThreeValues" }, @@ -1350,11 +1557,7 @@ }, { "page2type": "WindRoseFlex" - }, - { - "page2type": "Fluid" } - ] }, { @@ -1377,6 +1580,9 @@ { "page2type": "RollPitch" }, + { + "page2type": "SixValues" + }, { "page2type": "ThreeValues" }, @@ -1405,6 +1611,9 @@ { "page2type": "FourValues2" }, + { + "page2type": "SixValues" + }, { "page2type": "ThreeValues" }, @@ -1430,6 +1639,9 @@ { "page2type": "FourValues2" }, + { + "page2type": "SixValues" + }, { "page2type": "WindRoseFlex" } @@ -1446,6 +1658,9 @@ "obp40": "true" }, "condition": [ + { + "page2type": "SixValues" + }, { "page2type": "WindRoseFlex" } @@ -1462,6 +1677,9 @@ "obp40": "true" }, "condition": [ + { + "page2type": "SixValues" + }, { "page2type": "WindRoseFlex" } @@ -1533,6 +1751,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -1585,6 +1804,9 @@ "obp40": "true" }, "condition": [ + { + "page3type": "Fluid" + }, { "page3type": "FourValues" }, @@ -1597,6 +1819,9 @@ { "page3type": "RollPitch" }, + { + "page3type": "SixValues" + }, { "page3type": "ThreeValues" }, @@ -1605,9 +1830,6 @@ }, { "page3type": "WindRoseFlex" - }, - { - "page3type": "Fluid" } ] }, @@ -1631,6 +1853,9 @@ { "page3type": "RollPitch" }, + { + "page3type": "SixValues" + }, { "page3type": "ThreeValues" }, @@ -1659,6 +1884,9 @@ { "page3type": "FourValues2" }, + { + "page3type": "SixValues" + }, { "page3type": "ThreeValues" }, @@ -1684,6 +1912,9 @@ { "page3type": "FourValues2" }, + { + "page3type": "SixValues" + }, { "page3type": "WindRoseFlex" } @@ -1700,6 +1931,9 @@ "obp40": "true" }, "condition": [ + { + "page3type": "SixValues" + }, { "page3type": "WindRoseFlex" } @@ -1716,6 +1950,9 @@ "obp40": "true" }, "condition": [ + { + "page3type": "SixValues" + }, { "page3type": "WindRoseFlex" } @@ -1787,6 +2024,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -1836,6 +2074,9 @@ "obp40": "true" }, "condition": [ + { + "page4type": "Fluid" + }, { "page4type": "FourValues" }, @@ -1848,6 +2089,9 @@ { "page4type": "RollPitch" }, + { + "page4type": "SixValues" + }, { "page4type": "ThreeValues" }, @@ -1856,9 +2100,6 @@ }, { "page4type": "WindRoseFlex" - }, - { - "page4type": "Fluid" } ] }, @@ -1882,6 +2123,9 @@ { "page4type": "RollPitch" }, + { + "page4type": "SixValues" + }, { "page4type": "ThreeValues" }, @@ -1910,6 +2154,9 @@ { "page4type": "FourValues2" }, + { + "page4type": "SixValues" + }, { "page4type": "ThreeValues" }, @@ -1935,6 +2182,9 @@ { "page4type": "FourValues2" }, + { + "page4type": "SixValues" + }, { "page4type": "WindRoseFlex" } @@ -1951,6 +2201,9 @@ "obp40": "true" }, "condition": [ + { + "page4type": "SixValues" + }, { "page4type": "WindRoseFlex" } @@ -1967,6 +2220,9 @@ "obp40": "true" }, "condition": [ + { + "page4type": "SixValues" + }, { "page4type": "WindRoseFlex" } @@ -2038,6 +2294,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -2084,6 +2341,9 @@ "obp40": "true" }, "condition": [ + { + "page5type": "Fluid" + }, { "page5type": "FourValues" }, @@ -2096,6 +2356,9 @@ { "page5type": "RollPitch" }, + { + "page5type": "SixValues" + }, { "page5type": "ThreeValues" }, @@ -2104,9 +2367,6 @@ }, { "page5type": "WindRoseFlex" - }, - { - "page5type": "Fluid" } ] }, @@ -2130,6 +2390,9 @@ { "page5type": "RollPitch" }, + { + "page5type": "SixValues" + }, { "page5type": "ThreeValues" }, @@ -2158,6 +2421,9 @@ { "page5type": "FourValues2" }, + { + "page5type": "SixValues" + }, { "page5type": "ThreeValues" }, @@ -2183,6 +2449,9 @@ { "page5type": "FourValues2" }, + { + "page5type": "SixValues" + }, { "page5type": "WindRoseFlex" } @@ -2199,6 +2468,9 @@ "obp40": "true" }, "condition": [ + { + "page5type": "SixValues" + }, { "page5type": "WindRoseFlex" } @@ -2215,6 +2487,9 @@ "obp40": "true" }, "condition": [ + { + "page5type": "SixValues" + }, { "page5type": "WindRoseFlex" } @@ -2286,6 +2561,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -2329,6 +2605,9 @@ "obp40": "true" }, "condition": [ + { + "page6type": "Fluid" + }, { "page6type": "FourValues" }, @@ -2341,6 +2620,9 @@ { "page6type": "RollPitch" }, + { + "page6type": "SixValues" + }, { "page6type": "ThreeValues" }, @@ -2349,9 +2631,6 @@ }, { "page6type": "WindRoseFlex" - }, - { - "page6type": "Fluid" } ] }, @@ -2375,6 +2654,9 @@ { "page6type": "RollPitch" }, + { + "page6type": "SixValues" + }, { "page6type": "ThreeValues" }, @@ -2403,6 +2685,9 @@ { "page6type": "FourValues2" }, + { + "page6type": "SixValues" + }, { "page6type": "ThreeValues" }, @@ -2428,6 +2713,9 @@ { "page6type": "FourValues2" }, + { + "page6type": "SixValues" + }, { "page6type": "WindRoseFlex" } @@ -2444,6 +2732,9 @@ "obp40": "true" }, "condition": [ + { + "page6type": "SixValues" + }, { "page6type": "WindRoseFlex" } @@ -2460,6 +2751,9 @@ "obp40": "true" }, "condition": [ + { + "page6type": "SixValues" + }, { "page6type": "WindRoseFlex" } @@ -2531,6 +2825,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -2571,6 +2866,9 @@ "obp40": "true" }, "condition": [ + { + "page7type": "Fluid" + }, { "page7type": "FourValues" }, @@ -2583,6 +2881,9 @@ { "page7type": "RollPitch" }, + { + "page7type": "SixValues" + }, { "page7type": "ThreeValues" }, @@ -2591,9 +2892,6 @@ }, { "page7type": "WindRoseFlex" - }, - { - "page7type": "Fluid" } ] }, @@ -2617,6 +2915,9 @@ { "page7type": "RollPitch" }, + { + "page7type": "SixValues" + }, { "page7type": "ThreeValues" }, @@ -2645,6 +2946,9 @@ { "page7type": "FourValues2" }, + { + "page7type": "SixValues" + }, { "page7type": "ThreeValues" }, @@ -2670,6 +2974,9 @@ { "page7type": "FourValues2" }, + { + "page7type": "SixValues" + }, { "page7type": "WindRoseFlex" } @@ -2686,6 +2993,9 @@ "obp40": "true" }, "condition": [ + { + "page7type": "SixValues" + }, { "page7type": "WindRoseFlex" } @@ -2702,6 +3012,9 @@ "obp40": "true" }, "condition": [ + { + "page7type": "SixValues" + }, { "page7type": "WindRoseFlex" } @@ -2773,6 +3086,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -2810,6 +3124,9 @@ "obp40": "true" }, "condition": [ + { + "page8type": "Fluid" + }, { "page8type": "FourValues" }, @@ -2822,6 +3139,9 @@ { "page8type": "RollPitch" }, + { + "page8type": "SixValues" + }, { "page8type": "ThreeValues" }, @@ -2830,9 +3150,6 @@ }, { "page8type": "WindRoseFlex" - }, - { - "page8type": "Fluid" } ] }, @@ -2856,6 +3173,9 @@ { "page8type": "RollPitch" }, + { + "page8type": "SixValues" + }, { "page8type": "ThreeValues" }, @@ -2884,6 +3204,9 @@ { "page8type": "FourValues2" }, + { + "page8type": "SixValues" + }, { "page8type": "ThreeValues" }, @@ -2909,6 +3232,9 @@ { "page8type": "FourValues2" }, + { + "page8type": "SixValues" + }, { "page8type": "WindRoseFlex" } @@ -2925,6 +3251,9 @@ "obp40": "true" }, "condition": [ + { + "page8type": "SixValues" + }, { "page8type": "WindRoseFlex" } @@ -2941,6 +3270,9 @@ "obp40": "true" }, "condition": [ + { + "page8type": "SixValues" + }, { "page8type": "WindRoseFlex" } @@ -3012,6 +3344,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -3046,6 +3379,9 @@ "obp40": "true" }, "condition": [ + { + "page9type": "Fluid" + }, { "page9type": "FourValues" }, @@ -3058,6 +3394,9 @@ { "page9type": "RollPitch" }, + { + "page9type": "SixValues" + }, { "page9type": "ThreeValues" }, @@ -3066,9 +3405,6 @@ }, { "page9type": "WindRoseFlex" - }, - { - "page9type": "Fluid" } ] }, @@ -3092,6 +3428,9 @@ { "page9type": "RollPitch" }, + { + "page9type": "SixValues" + }, { "page9type": "ThreeValues" }, @@ -3120,6 +3459,9 @@ { "page9type": "FourValues2" }, + { + "page9type": "SixValues" + }, { "page9type": "ThreeValues" }, @@ -3145,6 +3487,9 @@ { "page9type": "FourValues2" }, + { + "page9type": "SixValues" + }, { "page9type": "WindRoseFlex" } @@ -3161,6 +3506,9 @@ "obp40": "true" }, "condition": [ + { + "page9type": "SixValues" + }, { "page9type": "WindRoseFlex" } @@ -3177,6 +3525,9 @@ "obp40": "true" }, "condition": [ + { + "page9type": "SixValues" + }, { "page9type": "WindRoseFlex" } @@ -3248,6 +3599,7 @@ "OneValue", "RollPitch", "RudderPosition", + "SixValues", "Solar", "ThreeValues", "TwoValues", @@ -3279,6 +3631,9 @@ "obp40": "true" }, "condition": [ + { + "page10type": "Fluid" + }, { "page10type": "FourValues" }, @@ -3291,6 +3646,9 @@ { "page10type": "RollPitch" }, + { + "page10type": "SixValues" + }, { "page10type": "ThreeValues" }, @@ -3299,9 +3657,6 @@ }, { "page10type": "WindRoseFlex" - }, - { - "page10type": "Fluid" } ] }, @@ -3325,6 +3680,9 @@ { "page10type": "RollPitch" }, + { + "page10type": "SixValues" + }, { "page10type": "ThreeValues" }, @@ -3353,6 +3711,9 @@ { "page10type": "FourValues2" }, + { + "page10type": "SixValues" + }, { "page10type": "ThreeValues" }, @@ -3378,6 +3739,9 @@ { "page10type": "FourValues2" }, + { + "page10type": "SixValues" + }, { "page10type": "WindRoseFlex" } @@ -3394,6 +3758,9 @@ "obp40": "true" }, "condition": [ + { + "page10type": "SixValues" + }, { "page10type": "WindRoseFlex" } @@ -3410,6 +3777,9 @@ "obp40": "true" }, "condition": [ + { + "page10type": "SixValues" + }, { "page10type": "WindRoseFlex" } diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index bdc28e0..fb3ef6f 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -79,8 +79,8 @@ void OBP60Init(GwApi *api){ } #ifdef BOARD_OBP40S3 - String sdcard = config->getConfigItem(config->useSDCard, true)->asString(); - if (sdcard == "on") { + bool sdcard = config->getBool(config->useSDCard); + if (sdcard) { SPIClass SD_SPI = SPIClass(HSPI); SD_SPI.begin(SD_SPI_CLK, SD_SPI_MISO, SD_SPI_MOSI); if (SD.begin(SD_SPI_CS, SD_SPI, 80000000)) { diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index 4acd552..21d56a5 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -94,7 +94,8 @@ lib_deps = adafruit/Adafruit FRAM I2C@^2.0.3 build_flags= -D DISABLE_DIAGNOSTIC_OUTPUT #Disable diagnostic output for GxEPD2 lib - -D BOARD_OBP40S3 #Board OBP40 V1.0 with ESP32S3 SKU:DIE07300S (CrowPanel 4.2) + -D BOARD_OBP40S3 #Board OBP40 with ESP32S3 + -D HARDWARE_V10 #OBP40 hardware revision V1.0 SKU:DIE07300S V1.1 (CrowPanel 4.2) -D DISPLAY_GDEY042T81 #new E-Ink display from Waveshare, R10 2.2 ohm #-D LIPO_ACCU_1200 #Hardware extension, LiPo accu 3,7V 1200mAh #-D VOLTAGE_SENSOR #Hardware extension, LiPo voltage sensor with two resistors