Moved to c++17 and espressif32 @ 6.9.0, fixed waypoint boatdata code
This commit is contained in:
parent
2d47702627
commit
f823dadc6b
|
@ -254,6 +254,10 @@ static void writeToString(GwTextWriter *writer, const int16_t &value)
|
|||
{
|
||||
writer->writeInteger(value);
|
||||
}
|
||||
static void writeToString(GwTextWriter *writer, String value)
|
||||
{
|
||||
writer->writeString(value.c_str());
|
||||
}
|
||||
static void writeToString(GwTextWriter *writer, GwSatInfoList &value)
|
||||
{
|
||||
writer->writeInteger(value.getNumSats());
|
||||
|
|
|
@ -121,7 +121,13 @@ template<class T> class GwBoatItem : public GwBoatItemBase{
|
|||
if (! isValid(millis())) return defaultv;
|
||||
return data;
|
||||
}
|
||||
virtual double getDoubleValue(){return (double)data;}
|
||||
virtual double getDoubleValue(){
|
||||
if constexpr (std::is_same<T, String>::value) {
|
||||
return 0.0; // TODO any better ideas?
|
||||
} else {
|
||||
return (double)data;
|
||||
}
|
||||
}
|
||||
virtual void fillString();
|
||||
virtual void toJsonDoc(GwJsonDocument *doc, unsigned long minTime);
|
||||
virtual int getLastSource(){return lastUpdateSource;}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -20,7 +20,7 @@ import getopt
|
|||
import re
|
||||
import json
|
||||
|
||||
__version__ = "0.2"
|
||||
__version__ = "1.2"
|
||||
|
||||
def detect_pages(filename):
|
||||
# returns a dictionary with page name and the number of gui fields
|
||||
|
@ -110,11 +110,10 @@ def create_json(device, no_of_pages, pagedata):
|
|||
"description": "The display for field {}".format(number_to_text(field_no)),
|
||||
"category": f"{device.upper()} Page {page_no}",
|
||||
"capabilities": {device.lower(): "true"},
|
||||
"condition": [
|
||||
{f"page{page_no}type": page}
|
||||
for page in pages
|
||||
if pagedata[page] >= field_no
|
||||
],
|
||||
"condition": {
|
||||
f"page{page_no}type": [page for page in pages if pagedata[page] >= field_no],
|
||||
"visiblePages": [vp for vp in range(page_no, no_of_pages + 1)]
|
||||
},
|
||||
}
|
||||
output.append(field_data)
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ default_envs =
|
|||
obp40_s3
|
||||
|
||||
[env:obp60_s3]
|
||||
platform = espressif32@6.8.1
|
||||
board_build.variants_dir = variants
|
||||
#board = obp60_s3_n8 #ESP32-S3 N8, 8MB flash, no PSRAM
|
||||
#board = obp60_s3_n16 #ESP32-S3 N16,16MB flash, no PSRAM, zero series
|
||||
|
@ -63,7 +62,6 @@ upload_speed = 230400
|
|||
monitor_speed = 115200
|
||||
|
||||
[env:obp40_s3]
|
||||
platform = espressif32@6.8.1
|
||||
board_build.variants_dir = variants
|
||||
board = obp40_s3_n8r8 #ESP32-S3 N8R8, 8MB flash, 8MB PSRAM, OBP60 clone (CrowPanel 4.2)
|
||||
board_build.partitions = default_8MB.csv #ESP32-S3 N8, 8MB flash
|
||||
|
|
|
@ -30,7 +30,7 @@ lib_deps =
|
|||
Update
|
||||
|
||||
[env]
|
||||
platform = espressif32 @ 6.8.1
|
||||
platform = espressif32 @ 6.9.0
|
||||
framework = arduino
|
||||
;platform_packages=
|
||||
; framework-arduinoespressif32 @ 3.20017.0
|
||||
|
@ -56,6 +56,9 @@ lib_ldf_mode = off
|
|||
monitor_speed = 115200
|
||||
build_flags =
|
||||
-D PIO_ENV_BUILD=$PIOENV
|
||||
-std=gnu++17
|
||||
build_unflags =
|
||||
-std=gnu++11
|
||||
|
||||
[sensors]
|
||||
; collect the libraries for sensors here
|
||||
|
|
Loading…
Reference in New Issue