Ols full refresh
This commit is contained in:
parent
abb3d56660
commit
f9a85d83eb
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue