diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index 30413a2..536e36a 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -49,12 +49,20 @@ void OBP60Init(GwApi *api){ String powermode = api->getConfig()->getConfigItem(api->getConfig()->powerMode,true)->asString(); api->getLogger()->logDebug(GwLog::DEBUG,"Power Mode is: %s", powermode.c_str()); if(powermode == "Max Power" || powermode == "Only 5.0V"){ + #ifdef HARDWARE_V21 setPortPin(OBP_POWER_50, true); // Power on 5.0V rail + #endif + #ifdef HARDWARE_LIGHT setPortPin(OBP_POWER_EPD, true);// Power on ePaper display + #endif } else{ + #ifdef HARDWARE_V21 setPortPin(OBP_POWER_50, false); // Power off 5.0V rail + #endif + #ifdef HARDWARE_LIGHT setPortPin(OBP_POWER_EPD, false);// Power off ePaper display + #endif } // Settings for e-paper display diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index 9485522..4010a82 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -54,8 +54,8 @@ build_flags= # -D DISPLAY_SE0420NQ04 #alternativ E-Ink display from SID Technology, R10 2.2 ohm ${env.build_flags} #CONFIG_ESP_TASK_WDT_TIMEOUT_S = 10 #Task Watchdog timeout period (seconds) [1...60] 5 default -#upload_port = /dev/ttyACM0 #OBP60 original -upload_port = /dev/ttyUSB0 #OBP60 clone +upload_port = /dev/ttyACM0 #OBP60 original +#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 diff --git a/lib/obp60task/platformio.ini.orig b/lib/obp60task/platformio.ini.orig index 9485522..4010a82 100644 --- a/lib/obp60task/platformio.ini.orig +++ b/lib/obp60task/platformio.ini.orig @@ -54,8 +54,8 @@ build_flags= # -D DISPLAY_SE0420NQ04 #alternativ E-Ink display from SID Technology, R10 2.2 ohm ${env.build_flags} #CONFIG_ESP_TASK_WDT_TIMEOUT_S = 10 #Task Watchdog timeout period (seconds) [1...60] 5 default -#upload_port = /dev/ttyACM0 #OBP60 original -upload_port = /dev/ttyUSB0 #OBP60 clone +upload_port = /dev/ttyACM0 #OBP60 original +#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