diff --git a/lib/obp60task/OBP60Extensions.h b/lib/obp60task/OBP60Extensions.h index b705753..eb59617 100644 --- a/lib/obp60task/OBP60Extensions.h +++ b/lib/obp60task/OBP60Extensions.h @@ -3,7 +3,6 @@ #include #include "OBP60Hardware.h" -#include #include // Driver for WS2812 RGB LED #include // 4.2" Waveshare S/W 300 x 400 pixel #include // GxEPD lip for SPI display communikation diff --git a/lib/obp60task/OBP60Hardware.h b/lib/obp60task/OBP60Hardware.h index ae4a4d7..c3ce5ec 100644 --- a/lib/obp60task/OBP60Hardware.h +++ b/lib/obp60task/OBP60Hardware.h @@ -41,7 +41,7 @@ #define FONT3 "Ubuntu_Bold32pt7b" #define FONT4 "DSEG7Classic_BoldItalic80pt7b" - // GPS (NEO-6M, NEO-M8N) + // GPS (NEO-6M, NEO-M8N, ATGM336H) #define OBP_GPS_RX 2 #define OBP_GPS_TX 1 // 1Wire (DS18B20) diff --git a/lib/obp60task/OBPSensorTask.cpp b/lib/obp60task/OBPSensorTask.cpp index 6d56121..1aeed9f 100644 --- a/lib/obp60task/OBPSensorTask.cpp +++ b/lib/obp60task/OBPSensorTask.cpp @@ -142,6 +142,19 @@ void sensorTask(void *param){ gps_ready = true; } } + if(String(gpsOn) == "ATGM336H"){ + Serial2.begin(9600, SERIAL_8N1, OBP_GPS_TX, -1); // GPS RX unused in hardware (-1) + if (!Serial2) { + api->getLogger()->logDebug(GwLog::ERROR,"GPS modul ATGM336H not found, check wiring"); + gps_ready = false; + } + else{ + api->getLogger()->logDebug(GwLog::LOG,"GPS modul ATGM336H found"); + NMEA0183.SetMessageStream(&Serial2); + NMEA0183.Open(); + gps_ready = true; + } + } // Settings for temperature sensors String tempSensor = api->getConfig()->getConfigItem(api->getConfig()->useTempSensor,true)->asString(); diff --git a/lib/obp60task/config.json b/lib/obp60task/config.json index 23652fc..82da582 100644 --- a/lib/obp60task/config.json +++ b/lib/obp60task/config.json @@ -176,7 +176,7 @@ "name": "distanceFormat", "label": "Distance Format", "type": "list", - "default": "m", + "default": "nm", "description": "Distance format [m|km|nm]", "list": [ "m", @@ -192,7 +192,7 @@ "name": "speedFormat", "label": "Speed Format", "type": "list", - "default": "m/s", + "default": "kn", "description": "Distance format [m/s|km/h|kn]", "list": [ "m/s", @@ -208,7 +208,7 @@ "name": "windspeedFormat", "label": "Wind Speed Format", "type": "list", - "default": "m/s", + "default": "kn", "description": "Wind speed format [m/s|km/h|kn|bft]", "list": [ "m/s", @@ -241,7 +241,7 @@ "name": "dateFormat", "label": "Date Format", "type": "list", - "default": "GB", + "default": "DE", "description": "Date format [DE|GB|US] DE: 31.12.2022, GB: 31/12/2022, US: 12/31/2022", "list": [ "DE", @@ -257,12 +257,13 @@ "name": "useGPS", "label": "GPS Sensor", "type": "list", - "default": "off", + "default": "ATGM336H", "description": "Use internal GPS module type [off|NEO-6M|NEO-M8N]", "list": [ "off", "NEO-6M", - "NEO-M8N" + "NEO-M8N", + "ATGM336H" ], "category": "OBP60 Hardware", "capabilities": { @@ -273,7 +274,7 @@ "name": "useEnvSensor", "label": "Env. Sensor", "type": "list", - "default": "off", + "default": "BMP280", "description": "Use internal or external environment sensor via I2C bus [off|BME280|BMP280|SHT21]", "list": [ "off", @@ -687,7 +688,7 @@ "name": "flashLED", "label": "Flash LED Mode", "type": "list", - "default": "Off", + "default": "Limit Violation", "description": "Settings for flash LED", "list": [ "Off", @@ -771,7 +772,7 @@ "check": "checkMinMax", "min": 1, "max": 10, - "default":"5", + "default":"10", "category":"OBP60 Pages", "capabilities": { "obp60":"true" @@ -854,7 +855,7 @@ "name": "page2type", "label": "Type", "type": "list", - "default": "ApparentWind", + "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"], "category": "OBP60 Page 2", @@ -976,7 +977,7 @@ "name": "page4type", "label": "Type", "type": "list", - "default": "OneValue", + "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"], "category": "OBP60 Page 4", @@ -989,7 +990,7 @@ "name": "page4value1", "label": "Field 1", "type": "boatData", - "default": "AWS", + "default": "STW", "description": "The display for field one", "category": "OBP60 Page 4", "capabilities": { @@ -1001,7 +1002,7 @@ "name": "page4value2", "label": "Field 2", "type": "boatData", - "default": "", + "default": "DBT", "description": "The display for field two", "category": "OBP60 Page 4", "capabilities": { @@ -1037,7 +1038,7 @@ "name": "page5type", "label": "Type", "type": "list", - "default": "OneValue", + "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"], "category": "OBP60 Page 5", @@ -1050,7 +1051,7 @@ "name": "page5value1", "label": "Field 1", "type": "boatData", - "default": "AWS", + "default": "COG", "description": "The display for field one", "category": "OBP60 Page 5", "capabilities": { @@ -1062,7 +1063,7 @@ "name": "page5value2", "label": "Field 2", "type": "boatData", - "default": "", + "default": "STW", "description": "The display for field two", "category": "OBP60 Page 5", "capabilities": { @@ -1074,7 +1075,7 @@ "name": "page5value3", "label": "Field 3", "type": "boatData", - "default": "", + "default": "DBT", "description": "The display for field 3", "category": "OBP60 Page 5", "capabilities": { @@ -1098,7 +1099,7 @@ "name": "page6type", "label": "Type", "type": "list", - "default": "OneValue", + "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"], "category": "OBP60 Page 6", @@ -1111,7 +1112,7 @@ "name": "page6value1", "label": "Field 1", "type": "boatData", - "default": "AWS", + "default": "AWA", "description": "The display for field one", "category": "OBP60 Page 6", "capabilities": { @@ -1123,7 +1124,7 @@ "name": "page6value2", "label": "Field 2", "type": "boatData", - "default": "", + "default": "AWS", "description": "The display for field two", "category": "OBP60 Page 6", "capabilities": { @@ -1135,7 +1136,7 @@ "name": "page6value3", "label": "Field 3", "type": "boatData", - "default": "", + "default": "COG", "description": "The display for field 3", "category": "OBP60 Page 6", "capabilities": { @@ -1147,7 +1148,7 @@ "name": "page6value4", "label": "Field 4", "type": "boatData", - "default": "", + "default": "STW", "description": "The display for field 4", "category": "OBP60 Page 6", "capabilities": { @@ -1159,7 +1160,7 @@ "name": "page7type", "label": "Type", "type": "list", - "default": "OneValue", + "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"], "category": "OBP60 Page 7", @@ -1172,7 +1173,7 @@ "name": "page7value1", "label": "Field 1", "type": "boatData", - "default": "AWS", + "default": "AWA", "description": "The display for field one", "category": "OBP60 Page 7", "capabilities": { @@ -1184,7 +1185,7 @@ "name": "page7value2", "label": "Field 2", "type": "boatData", - "default": "", + "default": "AWS", "description": "The display for field two", "category": "OBP60 Page 7", "capabilities": { @@ -1196,7 +1197,7 @@ "name": "page7value3", "label": "Field 3", "type": "boatData", - "default": "", + "default": "COG", "description": "The display for field 3", "category": "OBP60 Page 7", "capabilities": { @@ -1208,7 +1209,7 @@ "name": "page7value4", "label": "Field 4", "type": "boatData", - "default": "", + "default": "STW", "description": "The display for field 4", "category": "OBP60 Page 7", "capabilities": { @@ -1220,7 +1221,7 @@ "name": "page8type", "label": "Type", "type": "list", - "default": "OneValue", + "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"], "category": "OBP60 Page 8", @@ -1281,7 +1282,7 @@ "name": "page9type", "label": "Type", "type": "list", - "default": "OneValue", + "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"], "category": "OBP60 Page 9", @@ -1342,7 +1343,7 @@ "name": "page10type", "label": "Type", "type": "list", - "default": "OneValue", + "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"], "category": "OBP60 Page 10", diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index f359d89..6851bed 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -6,7 +6,7 @@ default_envs = obp60_s3 [env:obp60_s3] platform = espressif32@6.3.2 #board = obp60_s3_n8 #8MB flash, no PSRAM -board = obp60_s3_n16 #16MB flash, no PSRAM, zero series +board = obp60_s3_n16 #16MB flash, no PSRAM, zero series #board = obp60_s3_n8r8 #8MB flash, 8MB PSRAM #board = obp60_s3_n16r8 #16MB flash, 8MB PSRAM, production series board_build.variants_dir = variants @@ -33,6 +33,10 @@ lib_deps = build_flags= -DTIME=$UNIX_TIME -D BOARD_OBP60S3 + -D DISPLAY_GDEW042T2 #old E-Ink display from Waveshare, R10 0.47 ohm +# -D DISPLAY_GDEY042T81 #new E-Ink display from Waveshare, R10 2.2 ohm +# -D DISPLAY_GYE042A8 #alternativ E-Ink display from Genyo Optical, R10 2.2 ohm +# -D DISPLAY_SE0420NQ04 #alternativ E-Ink display from SID Technology, R10 2.2 ohm ${env.build_flags} upload_port = /dev/ttyACM0 upload_protocol = esptool