From f9a85d83eb94e732b7d1e1beda41936ae730c8c0 Mon Sep 17 00:00:00 2001 From: norbert-walter Date: Sun, 9 Jun 2024 17:55:46 +0200 Subject: [PATCH 1/4] Ols full refresh --- lib/obp60task/obp60task.cpp | 22 ++++++++++++++++++++-- lib/obp60task/platformio.ini | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index 7938589..8b5cca8 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -46,6 +46,13 @@ void OBP60Init(GwApi *api){ // Init hardware hardwareInit(); + // static const bool useFastFullUpdate = true; // For high speed full update e-paper + static const bool useFastFullUpdate = false; // For normal speed full update e-paper + /* + setCpuFrequencyMhz(80); + int freq = getCpuFrequencyMhz(); + api->getLogger()->logDebug(GwLog::LOG,"CPU speed: %i", freq); + */ // Settings for backlight String backlightMode = api->getConfig()->getConfigItem(api->getConfig()->backlight,true)->asString(); @@ -451,7 +458,7 @@ void OBP60Task(GwApi *api){ if(String(gpsFix) == "GPS Fix Lost" && date->valid == true){ setFlashLED(false); } - // Ifmissing GPS fix then LED on + // If missing GPS fix then LED on if(String(gpsFix) == "GPS Fix Lost" && date->valid == false){ setFlashLED(true); } @@ -528,6 +535,9 @@ void OBP60Task(GwApi *api){ // Full display update afer a new selected page and 4s wait time if(millis() > starttime4 + 4000 && delayedDisplayUpdate == true){ getdisplay().setFullWindow(); // Set full update + getdisplay().fillScreen(pixelcolor);// Clear display + getdisplay().nextPage(); // Full update + getdisplay().fillScreen(bgcolor);// Clear display getdisplay().nextPage(); // Full update delayedDisplayUpdate = false; } @@ -538,14 +548,22 @@ void OBP60Task(GwApi *api){ starttime1 = millis(); LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh first 5 min"); getdisplay().setFullWindow(); // Set full update + getdisplay().fillScreen(pixelcolor);// Clear display + getdisplay().nextPage(); // Full update + getdisplay().fillScreen(bgcolor);// Clear display getdisplay().nextPage(); // Full update } // Subtask E-Ink full refresh - if(millis() > starttime2 + FULL_REFRESH_TIME * 1000){ + //if(millis() > starttime2 + FULL_REFRESH_TIME * 1000){ + if(millis() > starttime2 + 1 * 60 * 1000){ starttime2 = millis(); LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh"); getdisplay().setFullWindow(); // Set full update + getdisplay().setFullWindow(); // Set full update + getdisplay().fillScreen(pixelcolor);// Clear display + getdisplay().nextPage(); // Full update + getdisplay().fillScreen(bgcolor);// Clear display getdisplay().nextPage(); // Full update } diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index 97235c0..1ffd63e 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -5,6 +5,7 @@ default_envs = obp60_s3 [env:obp60_s3] platform = espressif32@6.3.2 +-D board_build.f_cpu = 160000000L 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 From c62a75a1b3ba367be085851e2aa2636353ea0c58 Mon Sep 17 00:00:00 2001 From: Norbert Walter Date: Tue, 18 Jun 2024 11:46:01 +0200 Subject: [PATCH 2/4] Update platformio.ini Add upload and debug port via USB OTG --- lib/obp60task/platformio.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index 1ffd63e..15387e2 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -46,6 +46,8 @@ build_flags= ${env.build_flags} #CONFIG_ESP_TASK_WDT_TIMEOUT_S = 10 #Task Watchdog timeout period (seconds) [1...60] 5 default upload_port = /dev/ttyACM0 -upload_protocol = esptool +# debug_tool = esp-usb-bridge #debug via USB OTG +# upload_protocol = esp-usb-bridge #firmware upload via USB OTG +upload_protocol = esptool #normal firmware upload, by first upload need to set the ESP32-S3 in the upload mode with shortcut GND to Pin27 upload_speed = 230400 -monitor_speed = 115200 \ No newline at end of file +monitor_speed = 115200 From eb418d0abad49faefe90b76a4b71751debaa43de Mon Sep 17 00:00:00 2001 From: Norbert Walter Date: Tue, 18 Jun 2024 11:53:07 +0200 Subject: [PATCH 3/4] Update platformio.ini Changes --- lib/obp60task/platformio.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index 15387e2..635c985 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -46,8 +46,8 @@ build_flags= ${env.build_flags} #CONFIG_ESP_TASK_WDT_TIMEOUT_S = 10 #Task Watchdog timeout period (seconds) [1...60] 5 default upload_port = /dev/ttyACM0 -# debug_tool = esp-usb-bridge #debug via USB OTG -# upload_protocol = esp-usb-bridge #firmware upload via USB OTG -upload_protocol = esptool #normal firmware upload, by first upload need to set the ESP32-S3 in the upload mode with shortcut GND to Pin27 +# debug_tool = esp-usb-bridge #debug via USB OTG JTAG +# upload_protocol = esp-usb-bridge #firmware upload via USB OTG JTAG +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 From 01c15e9c946f1fc64a4a23bf9e1a75068de51b5e Mon Sep 17 00:00:00 2001 From: norbert-walter Date: Tue, 18 Jun 2024 21:17:58 +0200 Subject: [PATCH 4/4] Go ack to old one --- lib/obp60task/platformio.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index 635c985..65480ef 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -46,8 +46,6 @@ build_flags= ${env.build_flags} #CONFIG_ESP_TASK_WDT_TIMEOUT_S = 10 #Task Watchdog timeout period (seconds) [1...60] 5 default upload_port = /dev/ttyACM0 -# debug_tool = esp-usb-bridge #debug via USB OTG JTAG -# upload_protocol = esp-usb-bridge #firmware upload via USB OTG JTAG 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