From 15458553269fa6305204375f7f49b60e9810af42 Mon Sep 17 00:00:00 2001 From: Thomas Hooge Date: Mon, 20 Jan 2025 12:49:30 +0100 Subject: [PATCH] OBP40 integration code and improvements --- lib/obp60task/OBP60Extensions.cpp | 29 + lib/obp60task/OBP60Keypad.h | 6 +- lib/obp60task/Pagedata.h | 7 + lib/obp60task/config_obp40.json | 3398 +++++++++++++++++++++++++++++ lib/obp60task/obp60task.cpp | 40 + lib/obp60task/obp60task.h | 9 +- lib/obp60task/platformio.ini | 42 + 7 files changed, 3526 insertions(+), 5 deletions(-) create mode 100644 lib/obp60task/config_obp40.json diff --git a/lib/obp60task/OBP60Extensions.cpp b/lib/obp60task/OBP60Extensions.cpp index 153ecbb..4a333ba 100644 --- a/lib/obp60task/OBP60Extensions.cpp +++ b/lib/obp60task/OBP60Extensions.cpp @@ -326,12 +326,14 @@ void displayHeader(CommonData &commonData, GwApi::BoatValue *date, GwApi::BoatVa usbRxOld = commonData.status.usbRx; usbTxOld = commonData.status.usbTx; +#ifdef HARDWARE_V21 // Display key lock status if (commonData.keylock) { getdisplay().drawXBitmap(170, 1, lock_bits, icon_width, icon_height, commonData.fgcolor); } else { getdisplay().drawXBitmap(166, 1, swipe_bits, swipe_width, swipe_height, commonData.fgcolor); } +#endif // Heartbeat as dot getdisplay().setTextColor(commonData.fgcolor); @@ -376,6 +378,7 @@ void displayFooter(CommonData &commonData) { getdisplay().setFont(&Atari16px); getdisplay().setTextColor(commonData.fgcolor); +#ifdef HARDWARE_V21 // Frame around key icon area if (! commonData.keylock) { // horizontal elements @@ -422,6 +425,32 @@ void displayFooter(CommonData &commonData) { getdisplay().setCursor(65, 295); getdisplay().print("Press 1 and 6 fast to unlock keys"); } +#endif +#ifdef HARDWARE_LIGHT + // grapical page indicator + static const uint16_t r = 5; + static const uint16_t space = 4; + uint16_t w = commonData.data.maxpage * r * 2 + (commonData.data.maxpage - 1) * space; + uint16_t x0 = (GxEPD_WIDTH - w) / 2 + r * 2; + for (int i = 0; i < commonData.data.maxpage; i++) { + if (i == (commonData.data.actpage - 1)) { + getdisplay().fillCircle(x0 + i * (r * 2 + space), 290, r, commonData.fgcolor); + } else { + getdisplay().drawCircle(x0 + i * (r * 2 + space), 290, r, commonData.fgcolor); + } + } + // key indicators + // left side = top key "menu" + getdisplay().drawLine(0, 280, 10, 280, commonData.fgcolor); + getdisplay().drawLine(55, 280, 65, 280, commonData.fgcolor); + getdisplay().drawLine(65, 280, 65, 299, commonData.fgcolor); + drawTextCenter(33, 291, commonData.keydata[0].label); + // right side = bottom key "exit" + getdisplay().drawLine(390, 280, 399, 280, commonData.fgcolor); + getdisplay().drawLine(335, 280, 345, 280, commonData.fgcolor); + getdisplay().drawLine(335, 280, 335, 399, commonData.fgcolor); + drawTextCenter(366, 291, commonData.keydata[1].label); +#endif } // Sunset und sunrise calculation diff --git a/lib/obp60task/OBP60Keypad.h b/lib/obp60task/OBP60Keypad.h index 3df13f6..65ceed8 100644 --- a/lib/obp60task/OBP60Keypad.h +++ b/lib/obp60task/OBP60Keypad.h @@ -220,7 +220,7 @@ void initKeys(CommonData &commonData) { #ifdef HARDWARE_LIGHT int readSensorpads(){ - // Read key code + // Read key code if(digitalRead(UP) == LOW){ keycode = 10; // Left swipe } @@ -250,7 +250,7 @@ void initKeys(CommonData &commonData) { pinMode(MENUE, INPUT); pinMode(EXIT, INPUT); - // Raed pad values + // Read pad values readSensorpads(); // Detect key @@ -264,7 +264,7 @@ void initKeys(CommonData &commonData) { keystatus = keycode; // Copy keycode keycodeold = keycode; - while(readSensorpads() > 0){} // Wait for pad lesease + while(readSensorpads() > 0){} // Wait for pad release delay(keydelay); } } diff --git a/lib/obp60task/Pagedata.h b/lib/obp60task/Pagedata.h index 2a72ba6..b065049 100644 --- a/lib/obp60task/Pagedata.h +++ b/lib/obp60task/Pagedata.h @@ -103,6 +103,7 @@ class Page{ virtual void displayPage(PageData &pageData)=0; virtual void displayNew(PageData &pageData){} virtual void setupKeys() { +#ifdef HARDWARE_V21 commonData->keydata[0].label = ""; commonData->keydata[1].label = ""; commonData->keydata[2].label = "#LEFT"; @@ -113,6 +114,12 @@ class Page{ } else { commonData->keydata[5].label = ""; } +#endif +#ifdef HARDWARE_LIGHT + commonData->keydata[0].label = ""; + commonData->keydata[1].label = ""; + +#endif } //return -1 if handled by the page virtual int handleKey(int key){return key;} diff --git a/lib/obp60task/config_obp40.json b/lib/obp60task/config_obp40.json new file mode 100644 index 0000000..49ed083 --- /dev/null +++ b/lib/obp60task/config_obp40.json @@ -0,0 +1,3398 @@ +[ + { + "name": "deviceName", + "label": "system name", + "type": "string", + "default": "OBP40", + "check": "checkSystemName", + "description": "system name, used for the access point and for services", + "category": "system" + }, + { + "name": "timeZone", + "label": "Time Zone", + "type": "number", + "default": "0.00", + "check": "checkMinMax", + "min": -12.00, + "max": 14.00, + "description": "Time zone [UTC -12...+14]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "draft", + "label": "Boat Draft [m]", + "type": "number", + "default": "0.00", + "check": "checkMinMax", + "min": 0.00, + "max": 50.00, + "description": "The draft of the boat [0...50m]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "fuelTank", + "label": "Fuel Tank [l]", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": 0, + "max": 5000, + "description": "Fuel tank capacity [0...5000l]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "fuelConsumption", + "label": "Fuel Consuption [l/h]", + "type": "number", + "default": "0.00", + "check": "checkMinMax", + "min": 0.00, + "max": 1000.00, + "description": "Medium fuel consumption [0...1000l/h]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "waterTank", + "label": "Water Tank [l]", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": 0, + "max": 5000, + "description": "Water tank capacity [0...5000l]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "wasteTank", + "label": "Waste Tank [l]", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": 0, + "max": 5000, + "description": "Waste tank capacity [0...5000l]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "batteryVoltage", + "label": "Battery Voltage [V]", + "type": "list", + "default": "12V", + "description": "Battery Voltage [12V|24V]", + "list": [ + "12V", + "24V" + ], + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "batteryType", + "label": "Battery Type", + "type": "list", + "default": "Pb", + "description": "Type of battery [Pb|Gel|AGM|LiFePo4]", + "list": [ + "Pb", + "Gel", + "AGM", + "LiFePo4" + ], + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "batteryCapacity", + "label": "Battery Capacity [Ah]", + "type": "number", + "default": "0.0", + "check": "checkMinMax", + "min": 0.0, + "max": 10000.0, + "description": "Battery capacity [0...10000Ah]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "solarPower", + "label": "Solar Power [W]", + "type": "number", + "default": "0.0", + "check": "checkMinMax", + "min": 0.0, + "max": 10000.0, + "description": "Solar power [0...10000W]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "genPower", + "label": "Genarator Power [W]", + "type": "number", + "default": "0.0", + "check": "checkMinMax", + "min": 0.0, + "max": 10000.0, + "description": "Generator power [0...10000W]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "trackStep", + "label": "angle [deg]", + "type": "number", + "default": "3.0", + "check": "checkMinMax", + "min": 1.0, + "max": 12.0, + "description": "track step offset [1...12deg]", + "category": "OBP40 Settings", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "lengthFormat", + "label": "Length Format", + "type": "list", + "default": "m", + "description": "Length format [m|ft]", + "list": [ + "m", + "ft" + ], + "category": "OBP40 Units", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "distanceFormat", + "label": "Distance Format", + "type": "list", + "default": "nm", + "description": "Distance format [m|km|nm]", + "list": [ + "m", + "km", + "nm" + ], + "category": "OBP40 Units", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "speedFormat", + "label": "Speed Format", + "type": "list", + "default": "kn", + "description": "Distance format [m/s|km/h|kn]", + "list": [ + "m/s", + "km/h", + "kn" + ], + "category": "OBP40 Units", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "windspeedFormat", + "label": "Wind Speed Format", + "type": "list", + "default": "kn", + "description": "Wind speed format [m/s|km/h|kn|bft]", + "list": [ + "m/s", + "km/h", + "kn", + "bft" + ], + "category": "OBP40 Units", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "tempFormat", + "label": "Temperature Format", + "type": "list", + "default": "C", + "description": "Temperature format [K|C|F]", + "list": [ + "K", + "C", + "F" + ], + "category": "OBP40 Units", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "dateFormat", + "label": "Date Format", + "type": "list", + "default": "DE", + "description": "Date format [DE|GB|US|ISO] DE: 31.12.2022, GB: 31/12/2022, US: 12/31/2022, ISO: 2022-12-31", + "list": [ + "DE", + "GB", + "US", + "ISO" + ], + "category": "OBP40 Units", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "cpuSpeed", + "label": "CPU Speed [MHz]", + "type": "list", + "default": "160", + "description": "CPU speed in MHz [80|160|240]", + "list": [ + "80", + "160", + "240" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "useRTC", + "label": "RTC Modul", + "type": "list", + "default": "off", + "description": "Use internal RTC module type [off|DS1388]", + "list": [ + "off", + "DS1388" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "useGPS", + "label": "GPS Sensor", + "type": "list", + "default": "off", + "description": "Use internal GPS module type [off|NEO-6M|NEO-M8N|ATGM336H]", + "list": [ + "off", + "NEO-6M", + "NEO-M8N", + "ATGM336H" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "hdopAccuracy", + "label": "HDOP Accuracy [m]", + "type": "number", + "default": "20", + "check": "checkMinMax", + "min": 1, + "max": 50, + "description": "HDOP ccuracy in m for a valid GPS signal [1...50]", + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "useEnvSensor", + "label": "Env. Sensor", + "type": "list", + "default": "off", + "description": "Use internal or external environment sensor via I2C bus [off|BME280|BMP280|BMP180|BMP085|HTU21|SHT21]", + "list": [ + "off", + "BME280", + "BMP280", + "BMP180", + "BMP085", + "HTU21", + "SHT21" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "usePowSensor1", + "label": "Battery Sensor", + "type": "list", + "default": "off", + "description": "Use external power management sensor via I2C bus for battery [off|INA219|INA226|]", + "list": [ + "off", + "INA219", + "INA226" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "shunt1", + "label": "Battery Shunt", + "type": "list", + "default": "10", + "description": "Shunt current value [10A|50A|100A|200A|300A|400A|500A]", + "list": [ + "10", + "50", + "100", + "200", + "300", + "400", + "500" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "usePowSensor2", + "label": "Solar Sensor", + "type": "list", + "default": "off", + "description": "Use external power management sensor via I2C bus for solar panels [off|INA219|INA226|]", + "list": [ + "off", + "INA219", + "INA226" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "shunt2", + "label": "Solar Shunt", + "type": "list", + "default": "10", + "description": "Shunt current value [10A|50A|100A|200A|300A|400A|500A]", + "list": [ + "10", + "50", + "100", + "200", + "300", + "400", + "500" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "usePowSensor3", + "label": "Gen. Sensor", + "type": "list", + "default": "off", + "description": "Use external power management sensor via I2C bus for generator [off|INA219|INA226|]", + "list": [ + "off", + "INA219", + "INA226" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "shunt3", + "label": "Gen. Shunt", + "type": "list", + "default": "10", + "description": "Shunt current value [10A|50A|100A|200A|300A|400A|500A] @ 75mV", + "list": [ + "10", + "50", + "100", + "200", + "300", + "400", + "500" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "useRotSensor", + "label": "Rot. Sensor", + "type": "list", + "default": "off", + "description": "Use external rotation sensor via I2C bus [off|AS5600]", + "list": [ + "off", + "AS5600" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "rotFunction", + "label": "Rot. Function", + "type": "list", + "default": "off", + "description": "Function for rotation sensor [off|Rudder|Wind|Mast|Keel|Trim|Boom]", + "list": [ + "off", + "Rudder", + "Wind", + "Mast", + "Keel", + "Trim", + "Boom" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "rotOffset", + "label": "Rot. Offset", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": -180, + "max": 180, + "description": "Offset for rotation sensor [-180°...+180°]", + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "rollLimit", + "label": "Roll Limit", + "type": "number", + "default": "25", + "check": "checkMinMax", + "min": -90, + "max": 90, + "description": "Limit violation for roll angle [-90°...+90°]", + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "rollOffset", + "label": "Roll Offset", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": -45, + "max": 45, + "description": "Roll offset angle [-45°...+45°]", + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "pitchOffset", + "label": "Pitch Offset", + "type": "number", + "default": "0", + "check": "checkMinMax", + "min": -45, + "max": 45, + "description": "Pitch offset angle [-45°...+45°]", + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "useTempSensor", + "label": "Temp. Sensor", + "type": "boolean", + "default": "off", + "description": "Use max. 8 external 1Wire devices [off|DS18B20]", + "list": [ + "off", + "DS18B20" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "useSDCard", + "label": "SD Card", + "type": "boolean", + "default": "off", + "description": "Use internal SD card interface [off|on]", + "list": [ + "off", + "on" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "powerMode", + "label": "Power Mode", + "type": "list", + "default": "Max Power", + "description": "Settings for power mode", + "list": [ + "Max Power", + "Only 5.0V", + "Min Power" + ], + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "underVoltage", + "label": "Undervoltage", + "type": "boolean", + "default": "false", + "description": "Switch off device if voltage drops below 9V [on|off]", + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "useSimuData", + "label": "Simulation Data", + "type": "boolean", + "default": "false", + "description": "Use simulation data when bus data are missing [on|off]", + "category": "OBP40 Hardware", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "tSensitivity", + "label": "Touch Sensitivity [%]", + "type": "number", + "default": "100", + "check": "checkMinMax", + "min": 0, + "max": 100, + "description": "Touch sensitivity [0...100%] for sensor buttons", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "vOffset", + "label": "VSensor Offset", + "type": "number", + "default": "-1.00", + "description": "Offset for internal voltage sensor (ESP32)", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "vSlope", + "label": "VSensor Slope", + "type": "number", + "default": "1.00", + "description": "Slope for internal voltage sensor (ESP32)", + "category": "OBP40 Calibrations", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "display", + "label": "Display Mode", + "type": "list", + "default": "Logo + QR Code", + "description": "Settings for startup display", + "list": [ + "White Screen", + "Logo", + "Logo + QR Code", + "Off" + ], + "category": "OBP40 Display", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "displaycolor", + "label": "Inverted Display Mode", + "type": "list", + "default": "Normal", + "description": "Invert display to white letters on black background [Normal|Inverse]", + "list": [ + "Normal", + "Inverse" + ], + "category": "OBP40 Display", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "statusLine", + "label": "Status Line", + "type": "boolean", + "default": "true", + "description": "Show status line [on|off]", + "category": "OBP40 Display", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "refresh", + "label": "Refresh", + "type": "boolean", + "default": "true", + "description": "Refresh e-paper display after each new page request to reduce ghost effects [on|off]", + "category": "OBP40 Display", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "fastRefresh", + "label": "Fast Refresh", + "type": "boolean", + "default": "false", + "description": "Fast refresh for e-paper display [on|off]", + "category": "OBP40 Display", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "fullRefreshTime", + "label": "Full Refresh Time [min]", + "type": "number", + "default": "1", + "check": "checkMinMax", + "min": 1, + "max": 10, + "description": "E-Paper full refresh time all [1...10 min]", + "category": "OBP40 Display", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "holdvalues", + "label": "Hold Values", + "type": "boolean", + "default": "false", + "description": "Retain old values when data stream stops [on|off]", + "category": "OBP40 Display", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "backlight", + "label": "Backlight Mode", + "type": "list", + "default": "off", + "description": "Settings for automatic backlight mode", + "list": [ + "Off", + "Control by Sun", + "Control by Bus", + "Control by Time", + "Control by Key", + "On" + ], + "category": "OBP40 Display", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "blColor", + "label": "Backlight Color", + "type": "list", + "default": "Red", + "description": "Backlight color", + "list": [ + "Red", + "Orange", + "Yellow", + "Green", + "Blue", + "Aqua", + "Violet", + "White" + ], + "category": "OBP40 Display", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "blBrightness", + "label": "Brightness [%]", + "type": "number", + "default": "50", + "check": "checkMinMax", + "min": 20, + "max": 100, + "description": "Backlight brightness [20...100%]", + "category": "OBP40 Display", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "flashLED", + "label": "Flash LED Mode", + "type": "list", + "default": "Off", + "description": "Settings for flash LED", + "list": [ + "Off", + "Bus Data", + "GPS Fix Lost", + "Limit Violation" + ], + "category": "OBP40 Display", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "buzzerError", + "label": "Buzzer Error", + "type": "boolean", + "default": "false", + "description": "Sound on error [on|off]", + "category": "OBP40 Buzzer", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "buzzerGps", + "label": "Buzzer GPS Fix", + "type": "boolean", + "default": "false", + "description": "Sound on missing or lost GPS fix", + "category": "OBP40 Buzzer", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "buzzerLim", + "label": "Buzzer by Limits", + "type": "boolean", + "default": "false", + "description": "Sound on limit violation", + "category": "OBP40 Buzzer", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "buzzerMode", + "label": "Buzzer Mode", + "type": "list", + "default": "Off", + "description": "Settings for buzzer behaviour", + "list": [ + "Off", + "Short Single Beep", + "Longer Single Beep", + "Beep until Confirmation" + ], + "category": "OBP40 Buzzer", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "buzzerPower", + "label": "Buzzer Power [%]", + "type": "number", + "default": "50", + "check": "checkMinMax", + "min": 0, + "max": 100, + "description": "Buzzer loudness [0...100%]", + "category": "OBP40 Buzzer", + "capabilities": { + "obp40": "false" + } + }, + { + "name": "visiblePages", + "label": "Number of Pages", + "type": "number", + "check": "checkMinMax", + "min": 1, + "max": 10, + "default":"10", + "category":"OBP40 Pages", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "startPage", + "label": "Start Page", + "type": "number", + "check": "checkMinMax", + "min": 1, + "max": 10, + "default":"1", + "category":"OBP40 Pages", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "imageFormat", + "label": "Screenshot Format", + "type": "list", + "default":"PBM", + "description": "Graphics file format for screenshots [GIF|PBM|BMP]", + "list": [ + {"l":"Compressed image (GIF)","v":"GIF"}, + {"l":"Portable bitmap (PBM)","v":"PBM"}, + {"l":"Windows bitmap (BMP)","v":"BMP"} + ], + "category":"OBP40 Pages", + "capabilities": { + "obp40": "true" + } + }, + { + "name": "page1type", + "label": "Type", + "type": "list", + "default": "Clock", + "description": "Type of page for page 1", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 1", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 1 + }, + { + "visiblePages": 2 + }, + { + "visiblePages": 3 + }, + { + "visiblePages": 4 + }, + { + "visiblePages": 5 + }, + { + "visiblePages": 6 + }, + { + "visiblePages": 7 + }, + { + "visiblePages": 8 + }, + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page1value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 1", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page1type": "FourValues" + }, + { + "page1type": "FourValues2" + }, + { + "page1type": "OneValue" + }, + { + "page1type": "RollPitch" + }, + { + "page1type": "ThreeValues" + }, + { + "page1type": "TwoValues" + }, + { + "page1type": "WindRoseFlex" + }, + { + "page1type": "Fluid" + } + ] + }, + { + "name": "page1value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 1", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page1type": "FourValues" + }, + { + "page1type": "FourValues2" + }, + { + "page1type": "RollPitch" + }, + { + "page1type": "ThreeValues" + }, + { + "page1type": "TwoValues" + }, + { + "page1type": "WindRoseFlex" + } + ] + }, + { + "name": "page1value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 1", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page1type": "FourValues" + }, + { + "page1type": "FourValues2" + }, + { + "page1type": "ThreeValues" + }, + { + "page1type": "WindRoseFlex" + } + ] + }, + { + "name": "page1value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 1", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page1type": "FourValues" + }, + { + "page1type": "FourValues2" + }, + { + "page1type": "WindRoseFlex" + } + ] + }, + { + "name": "page1value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 1", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page1type": "WindRoseFlex" + } + ] + }, + { + "name": "page1value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 1", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page1type": "WindRoseFlex" + } + ] + }, + { + "name": "page1fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 1", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page1type": "Fluid" + } + ] + }, + { + "name": "page2type", + "label": "Type", + "type": "list", + "default": "Wind", + "description": "Type of page for page 2", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 2", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 2 + }, + { + "visiblePages": 3 + }, + { + "visiblePages": 4 + }, + { + "visiblePages": 5 + }, + { + "visiblePages": 6 + }, + { + "visiblePages": 7 + }, + { + "visiblePages": 8 + }, + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page2value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 2", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page2type": "FourValues" + }, + { + "page2type": "FourValues2" + }, + { + "page2type": "OneValue" + }, + { + "page2type": "RollPitch" + }, + { + "page2type": "ThreeValues" + }, + { + "page2type": "TwoValues" + }, + { + "page2type": "WindRoseFlex" + }, + { + "page2type": "Fluid" + } + + ] + }, + { + "name": "page2value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 2", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page2type": "FourValues" + }, + { + "page2type": "FourValues2" + }, + { + "page2type": "RollPitch" + }, + { + "page2type": "ThreeValues" + }, + { + "page2type": "TwoValues" + }, + { + "page2type": "WindRoseFlex" + } + ] + }, + { + "name": "page2value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 2", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page2type": "FourValues" + }, + { + "page2type": "FourValues2" + }, + { + "page2type": "ThreeValues" + }, + { + "page2type": "WindRoseFlex" + } + ] + }, + { + "name": "page2value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 2", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page2type": "FourValues" + }, + { + "page2type": "FourValues2" + }, + { + "page2type": "WindRoseFlex" + } + ] + }, + { + "name": "page2value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 2", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page2type": "WindRoseFlex" + } + ] + }, + { + "name": "page2value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 2", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page2type": "WindRoseFlex" + } + ] + }, + { + "name": "page2fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 2", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page2type": "Fluid" + } + ] + }, + { + "name": "page3type", + "label": "Type", + "type": "list", + "default": "OneValue", + "description": "Type of page for page 3", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 3", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 3 + }, + { + "visiblePages": 4 + }, + { + "visiblePages": 5 + }, + { + "visiblePages": 6 + }, + { + "visiblePages": 7 + }, + { + "visiblePages": 8 + }, + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page3value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 3", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page3type": "FourValues" + }, + { + "page3type": "FourValues2" + }, + { + "page3type": "OneValue" + }, + { + "page3type": "RollPitch" + }, + { + "page3type": "ThreeValues" + }, + { + "page3type": "TwoValues" + }, + { + "page3type": "WindRoseFlex" + }, + { + "page3type": "Fluid" + } + ] + }, + { + "name": "page3value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 3", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page3type": "FourValues" + }, + { + "page3type": "FourValues2" + }, + { + "page3type": "RollPitch" + }, + { + "page3type": "ThreeValues" + }, + { + "page3type": "TwoValues" + }, + { + "page3type": "WindRoseFlex" + } + ] + }, + { + "name": "page3value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 3", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page3type": "FourValues" + }, + { + "page3type": "FourValues2" + }, + { + "page3type": "ThreeValues" + }, + { + "page3type": "WindRoseFlex" + } + ] + }, + { + "name": "page3value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 3", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page3type": "FourValues" + }, + { + "page3type": "FourValues2" + }, + { + "page3type": "WindRoseFlex" + } + ] + }, + { + "name": "page3value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 3", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page3type": "WindRoseFlex" + } + ] + }, + { + "name": "page3value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 3", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page3type": "WindRoseFlex" + } + ] + }, + { + "name": "page3fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 3", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page3type": "Fluid" + } + ] + }, + { + "name": "page4type", + "label": "Type", + "type": "list", + "default": "TwoValues", + "description": "Type of page for page 4", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 4", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 4 + }, + { + "visiblePages": 5 + }, + { + "visiblePages": 6 + }, + { + "visiblePages": 7 + }, + { + "visiblePages": 8 + }, + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page4value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 4", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page4type": "FourValues" + }, + { + "page4type": "FourValues2" + }, + { + "page4type": "OneValue" + }, + { + "page4type": "RollPitch" + }, + { + "page4type": "ThreeValues" + }, + { + "page4type": "TwoValues" + }, + { + "page4type": "WindRoseFlex" + }, + { + "page4type": "Fluid" + } + ] + }, + { + "name": "page4value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 4", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page4type": "FourValues" + }, + { + "page4type": "FourValues2" + }, + { + "page4type": "RollPitch" + }, + { + "page4type": "ThreeValues" + }, + { + "page4type": "TwoValues" + }, + { + "page4type": "WindRoseFlex" + } + ] + }, + { + "name": "page4value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 4", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page4type": "FourValues" + }, + { + "page4type": "FourValues2" + }, + { + "page4type": "ThreeValues" + }, + { + "page4type": "WindRoseFlex" + } + ] + }, + { + "name": "page4value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 4", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page4type": "FourValues" + }, + { + "page4type": "FourValues2" + }, + { + "page4type": "WindRoseFlex" + } + ] + }, + { + "name": "page4value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 4", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page4type": "WindRoseFlex" + } + ] + }, + { + "name": "page4value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 4", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page4type": "WindRoseFlex" + } + ] + }, + { + "name": "page4fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 4", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page4type": "Fluid" + } + ] + }, + { + "name": "page5type", + "label": "Type", + "type": "list", + "default": "ThreeValues", + "description": "Type of page for page 5", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 5", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 5 + }, + { + "visiblePages": 6 + }, + { + "visiblePages": 7 + }, + { + "visiblePages": 8 + }, + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page5value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 5", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page5type": "FourValues" + }, + { + "page5type": "FourValues2" + }, + { + "page5type": "OneValue" + }, + { + "page5type": "RollPitch" + }, + { + "page5type": "ThreeValues" + }, + { + "page5type": "TwoValues" + }, + { + "page5type": "WindRoseFlex" + }, + { + "page5type": "Fluid" + } + ] + }, + { + "name": "page5value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 5", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page5type": "FourValues" + }, + { + "page5type": "FourValues2" + }, + { + "page5type": "RollPitch" + }, + { + "page5type": "ThreeValues" + }, + { + "page5type": "TwoValues" + }, + { + "page5type": "WindRoseFlex" + } + ] + }, + { + "name": "page5value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 5", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page5type": "FourValues" + }, + { + "page5type": "FourValues2" + }, + { + "page5type": "ThreeValues" + }, + { + "page5type": "WindRoseFlex" + } + ] + }, + { + "name": "page5value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 5", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page5type": "FourValues" + }, + { + "page5type": "FourValues2" + }, + { + "page5type": "WindRoseFlex" + } + ] + }, + { + "name": "page5value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 5", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page5type": "WindRoseFlex" + } + ] + }, + { + "name": "page5value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 5", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page5type": "WindRoseFlex" + } + ] + }, + { + "name": "page5fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 5", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page5type": "Fluid" + } + ] + }, + { + "name": "page6type", + "label": "Type", + "type": "list", + "default": "FourValues", + "description": "Type of page for page 6", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 6", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 6 + }, + { + "visiblePages": 7 + }, + { + "visiblePages": 8 + }, + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page6value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 6", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page6type": "FourValues" + }, + { + "page6type": "FourValues2" + }, + { + "page6type": "OneValue" + }, + { + "page6type": "RollPitch" + }, + { + "page6type": "ThreeValues" + }, + { + "page6type": "TwoValues" + }, + { + "page6type": "WindRoseFlex" + }, + { + "page6type": "Fluid" + } + ] + }, + { + "name": "page6value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 6", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page6type": "FourValues" + }, + { + "page6type": "FourValues2" + }, + { + "page6type": "RollPitch" + }, + { + "page6type": "ThreeValues" + }, + { + "page6type": "TwoValues" + }, + { + "page6type": "WindRoseFlex" + } + ] + }, + { + "name": "page6value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 6", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page6type": "FourValues" + }, + { + "page6type": "FourValues2" + }, + { + "page6type": "ThreeValues" + }, + { + "page6type": "WindRoseFlex" + } + ] + }, + { + "name": "page6value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 6", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page6type": "FourValues" + }, + { + "page6type": "FourValues2" + }, + { + "page6type": "WindRoseFlex" + } + ] + }, + { + "name": "page6value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 6", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page6type": "WindRoseFlex" + } + ] + }, + { + "name": "page6value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 6", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page6type": "WindRoseFlex" + } + ] + }, + { + "name": "page6fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 6", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page6type": "Fluid" + } + ] + }, + { + "name": "page7type", + "label": "Type", + "type": "list", + "default": "FourValues2", + "description": "Type of page for page 7", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 7", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 7 + }, + { + "visiblePages": 8 + }, + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page7value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 7", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page7type": "FourValues" + }, + { + "page7type": "FourValues2" + }, + { + "page7type": "OneValue" + }, + { + "page7type": "RollPitch" + }, + { + "page7type": "ThreeValues" + }, + { + "page7type": "TwoValues" + }, + { + "page7type": "WindRoseFlex" + }, + { + "page7type": "Fluid" + } + ] + }, + { + "name": "page7value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 7", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page7type": "FourValues" + }, + { + "page7type": "FourValues2" + }, + { + "page7type": "RollPitch" + }, + { + "page7type": "ThreeValues" + }, + { + "page7type": "TwoValues" + }, + { + "page7type": "WindRoseFlex" + } + ] + }, + { + "name": "page7value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 7", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page7type": "FourValues" + }, + { + "page7type": "FourValues2" + }, + { + "page7type": "ThreeValues" + }, + { + "page7type": "WindRoseFlex" + } + ] + }, + { + "name": "page7value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 7", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page7type": "FourValues" + }, + { + "page7type": "FourValues2" + }, + { + "page7type": "WindRoseFlex" + } + ] + }, + { + "name": "page7value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 7", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page7type": "WindRoseFlex" + } + ] + }, + { + "name": "page7value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 7", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page7type": "WindRoseFlex" + } + ] + }, + { + "name": "page7fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 7", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page7type": "Fluid" + } + ] + }, + { + "name": "page8type", + "label": "Type", + "type": "list", + "default": "Fluid", + "description": "Type of page for page 8", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 8", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 8 + }, + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page8value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 8", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page8type": "FourValues" + }, + { + "page8type": "FourValues2" + }, + { + "page8type": "OneValue" + }, + { + "page8type": "RollPitch" + }, + { + "page8type": "ThreeValues" + }, + { + "page8type": "TwoValues" + }, + { + "page8type": "WindRoseFlex" + }, + { + "page8type": "Fluid" + } + ] + }, + { + "name": "page8value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 8", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page8type": "FourValues" + }, + { + "page8type": "FourValues2" + }, + { + "page8type": "RollPitch" + }, + { + "page8type": "ThreeValues" + }, + { + "page8type": "TwoValues" + }, + { + "page8type": "WindRoseFlex" + } + ] + }, + { + "name": "page8value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 8", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page8type": "FourValues" + }, + { + "page8type": "FourValues2" + }, + { + "page8type": "ThreeValues" + }, + { + "page8type": "WindRoseFlex" + } + ] + }, + { + "name": "page8value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 8", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page8type": "FourValues" + }, + { + "page8type": "FourValues2" + }, + { + "page8type": "WindRoseFlex" + } + ] + }, + { + "name": "page8value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 8", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page8type": "WindRoseFlex" + } + ] + }, + { + "name": "page8value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 8", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page8type": "WindRoseFlex" + } + ] + }, + { + "name": "page8fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 8", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page8type": "Fluid" + } + ] + }, + { + "name": "page9type", + "label": "Type", + "type": "list", + "default": "RollPitch", + "description": "Type of page for page 9", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 9", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 9 + }, + { + "visiblePages": 10 + } + ] + }, + { + "name": "page9value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 9", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page9type": "FourValues" + }, + { + "page9type": "FourValues2" + }, + { + "page9type": "OneValue" + }, + { + "page9type": "RollPitch" + }, + { + "page9type": "ThreeValues" + }, + { + "page9type": "TwoValues" + }, + { + "page9type": "WindRoseFlex" + }, + { + "page9type": "Fluid" + } + ] + }, + { + "name": "page9value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 9", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page9type": "FourValues" + }, + { + "page9type": "FourValues2" + }, + { + "page9type": "RollPitch" + }, + { + "page9type": "ThreeValues" + }, + { + "page9type": "TwoValues" + }, + { + "page9type": "WindRoseFlex" + } + ] + }, + { + "name": "page9value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 9", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page9type": "FourValues" + }, + { + "page9type": "FourValues2" + }, + { + "page9type": "ThreeValues" + }, + { + "page9type": "WindRoseFlex" + } + ] + }, + { + "name": "page9value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 9", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page9type": "FourValues" + }, + { + "page9type": "FourValues2" + }, + { + "page9type": "WindRoseFlex" + } + ] + }, + { + "name": "page9value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 9", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page9type": "WindRoseFlex" + } + ] + }, + { + "name": "page9value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 9", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page9type": "WindRoseFlex" + } + ] + }, + { + "name": "page9fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 9", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page9type": "Fluid" + } + ] + }, + { + "name": "page10type", + "label": "Type", + "type": "list", + "default": "Battery2", + "description": "Type of page for page 10", + "list": [ + "BME280", + "Battery", + "Battery2", + "Clock", + "DST810", + "Fluid", + "FourValues", + "FourValues2", + "Generator", + "KeelPosition", + "OneValue", + "RollPitch", + "RudderPosition", + "Solar", + "ThreeValues", + "TwoValues", + "Voltage", + "White", + "Wind", + "WindRose", + "WindRoseFlex", + "XTETrack" + ], + "category": "OBP40 Page 10", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "visiblePages": 10 + } + ] + }, + { + "name": "page10value1", + "label": "Field 1", + "type": "boatData", + "default": "", + "description": "The display for field one", + "category": "OBP40 Page 10", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page10type": "FourValues" + }, + { + "page10type": "FourValues2" + }, + { + "page10type": "OneValue" + }, + { + "page10type": "RollPitch" + }, + { + "page10type": "ThreeValues" + }, + { + "page10type": "TwoValues" + }, + { + "page10type": "WindRoseFlex" + }, + { + "page10type": "Fluid" + } + ] + }, + { + "name": "page10value2", + "label": "Field 2", + "type": "boatData", + "default": "", + "description": "The display for field two", + "category": "OBP40 Page 10", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page10type": "FourValues" + }, + { + "page10type": "FourValues2" + }, + { + "page10type": "RollPitch" + }, + { + "page10type": "ThreeValues" + }, + { + "page10type": "TwoValues" + }, + { + "page10type": "WindRoseFlex" + } + ] + }, + { + "name": "page10value3", + "label": "Field 3", + "type": "boatData", + "default": "", + "description": "The display for field three", + "category": "OBP40 Page 10", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page10type": "FourValues" + }, + { + "page10type": "FourValues2" + }, + { + "page10type": "ThreeValues" + }, + { + "page10type": "WindRoseFlex" + } + ] + }, + { + "name": "page10value4", + "label": "Field 4", + "type": "boatData", + "default": "", + "description": "The display for field four", + "category": "OBP40 Page 10", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page10type": "FourValues" + }, + { + "page10type": "FourValues2" + }, + { + "page10type": "WindRoseFlex" + } + ] + }, + { + "name": "page10value5", + "label": "Field 5", + "type": "boatData", + "default": "", + "description": "The display for field five", + "category": "OBP40 Page 10", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page10type": "WindRoseFlex" + } + ] + }, + { + "name": "page10value6", + "label": "Field 6", + "type": "boatData", + "default": "", + "description": "The display for field six", + "category": "OBP40 Page 10", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page10type": "WindRoseFlex" + } + ] + }, + { + "name": "page10fluid", + "label": "Fluid type", + "type": "list", + "default": "0", + "list": [ + { + "l": "Fuel (0)", + "v": "0" + }, + { + "l": "Water (1)", + "v": "1" + }, + { + "l": "Gray Water (2)", + "v": "2" + }, + { + "l": "Live Well (3)", + "v": "3" + }, + { + "l": "Oil (4)", + "v": "4" + }, + { + "l": "Black Water (5)", + "v": "5" + }, + { + "l": "Fuel Gasoline (6)", + "v": "6" + } + ], + "description": "Fluid type in tank", + "category": "OBP40 Page 10", + "capabilities": { + "obp40": "true" + }, + "condition": [ + { + "page10type": "Fluid" + } + ] + } +] diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index 46af73a..728e2b3 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -13,6 +13,12 @@ #include "OBP60Extensions.h" // Functions lib for extension board #include "OBP60Keypad.h" // Functions for keypad +#ifdef HARDWARE_LIGHT +#include // SD-Card access +#include +#include +#endif + // True type character sets includes // See OBP60ExtensionPort.cpp @@ -33,6 +39,9 @@ int taskRunCounter = 0; // Task couter for loop section //#################################################################################### void OBP60Init(GwApi *api){ + GwLog *logger = api->getLogger(); + GwConfigHandler *config = api->getConfig(); + // Set a new device name and hidden the original name in the main config String devicename = api->getConfig()->getConfigItem(api->getConfig()->deviceName,true)->asString(); api->getConfig()->setValue(GwConfigDefinitions::systemName, devicename, GwConfigInterface::ConfigType::HIDDEN); @@ -45,6 +54,33 @@ void OBP60Init(GwApi *api){ // Init hardware hardwareInit(api); +#ifdef HARDWARE_LIGHT + String sdcard = config->getConfigItem(config->useSDCard, true)->asString(); + if (sdcard == "on") { + setPortPin(OBP_POWER_SD, true); // Power on SD + delay(10); + 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)) { + String sdtype = "unknown"; + uint8_t cardType = SD.cardType(); + switch (cardType) { + case CARD_MMC: + sdtype = "MMC"; + break; + case CARD_SD: + sdtype = "SDSC"; + break; + case CARD_SDHC: + sdtype = "SDHC"; + break; + } + uint64_t cardSize = SD.cardSize() / (1024 * 1024); + LOG_DEBUG(GwLog::LOG,"SD card type %s of size %d MB detected", sdtype, cardSize); + } + } +#endif + // Init power rail 5.0V String powermode = api->getConfig()->getConfigItem(api->getConfig()->powerMode,true)->asString(); api->getLogger()->logDebug(GwLog::DEBUG,"Power Mode is: %s", powermode.c_str()); @@ -288,15 +324,19 @@ void OBP60Task(GwApi *api){ // return; GwLog *logger=api->getLogger(); GwConfigHandler *config=api->getConfig(); +#ifdef HARDWARE_V21 startLedTask(api); +#endif PageList allPages; registerAllPages(allPages); CommonData commonData; commonData.logger=logger; commonData.config=config; +#ifdef HARDWARE_V21 // Keyboard coordinates for page footer initKeys(commonData); +#endif tN2kMsg N2kMsg; diff --git a/lib/obp60task/obp60task.h b/lib/obp60task/obp60task.h index 97bd73a..2284e6f 100644 --- a/lib/obp60task/obp60task.h +++ b/lib/obp60task/obp60task.h @@ -19,7 +19,7 @@ #define ESP32_CAN_TX_PIN 15 #define ESP32_CAN_RX_PIN 16 // Bus load in 50mA steps - #define N2K_LOAD_LEVEL 2 // 5x50mA = 100mA max bus load with back light on + #define N2K_LOAD_LEVEL 2 // 2x50mA = 100mA max bus load // RS485 NMEA0183 #define GWSERIAL_TX 9 #define GWSERIAL_RX 14 @@ -35,6 +35,11 @@ // OBP60 Task void OBP60Task(GwApi *param); DECLARE_USERTASK_PARAM(OBP60Task, 35000); // Need 35k RAM as stack size + #ifdef HARDWARE_V21 DECLARE_CAPABILITY(obp60,true); + #endif + #ifdef HARDWARE_LIGHT + DECLARE_CAPABILITY(obp40,true) + #endif DECLARE_STRING_CAPABILITY(HELP_URL, "https://obp60-v2-docu.readthedocs.io/de/latest/"); // Link to help pages -#endif \ No newline at end of file +#endif diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index 4010a82..ec58574 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -59,3 +59,45 @@ upload_port = /dev/ttyACM0 #OBP60 original upload_protocol = esptool #firmware upload via USB OTG seriell, by first upload need to set the ESP32-S3 in the upload mode with shortcut GND to Pin27 upload_speed = 230400 monitor_speed = 115200 + +[env:obp40] +platform = espressif32@6.8.1 +board_build.variants_dir = variants +board = obp60_s3_light_n8r8 #ESP32-S3 N8R8, 8MB flash, 8MB PSRAM, OBP60 clone +board_build.partitions = default_8MB.csv #ESP32-S3 N8, 8MB flash +custom_config = config_obp40.json +framework = arduino +lib_deps = + ${basedeps.lib_deps} + Wire + SPI + SD + esphome/AsyncTCP-esphome@2.0.1 + robtillaart/PCF8574@0.3.9 + adafruit/Adafruit Unified Sensor @ 1.1.13 + blemasle/MCP23017@2.0.0 + adafruit/Adafruit BusIO@1.5.0 + adafruit/Adafruit GFX Library@1.11.9 + #zinggjm/GxEPD2@1.5.8 + #https://github.com/ZinggJM/GxEPD2 + https://github.com/thooge/GxEPD2 + sstaub/Ticker@4.4.0 + adafruit/Adafruit BMP280 Library@2.6.2 + adafruit/Adafruit BME280 Library@2.2.2 + adafruit/Adafruit BMP085 Library@1.2.1 + enjoyneering/HTU21D@1.2.1 + robtillaart/INA226@0.2.0 + paulstoffregen/OneWire@2.3.8 + milesburton/DallasTemperature@3.11.0 + signetica/SunRise@2.0.2 + adafruit/Adafruit FRAM I2C@^2.0.3 +build_flags= + -D DISABLE_DIAGNOSTIC_OUTPUT #Disable diagnostic output for GxEPD2 lib + -D BOARD_OBP60S3 #Board OBP60 V2.1 with ESP32S3 + -D HARDWARE_LIGHT #OBP60 hardware clone (OBP40) + -D DISPLAY_GDEY042T81 #new E-Ink display from Waveshare, R10 2.2 ohm + ${env.build_flags} +upload_port = /dev/ttyUSB0 #OBP60 clone +upload_protocol = esptool #firmware upload via USB OTG seriell, by first upload need to set the ESP32-S3 in the upload mode with shortcut GND to Pin27 +upload_speed = 230400 +monitor_speed = 115200