forked from btclock/btclock_v3
Add "storage mode" to protect EPDs (lowest button while booting)
This commit is contained in:
parent
37c57b7d97
commit
23ef2a64cc
2 changed files with 26 additions and 5 deletions
|
@ -31,6 +31,16 @@ void setup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
if (mcp1.digitalRead(0) == LOW)
|
||||||
|
{
|
||||||
|
// Then loop forever to prevent anything else from writing to the screen
|
||||||
|
while (true) {
|
||||||
|
delay(1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tryImprovSetup();
|
tryImprovSetup();
|
||||||
|
|
||||||
setupWebserver();
|
setupWebserver();
|
||||||
|
|
|
@ -155,7 +155,19 @@ void setupDisplays()
|
||||||
11, &tasks[i]); // create task
|
11, &tasks[i]); // create task
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hold lower button to enable "storage mode" (prevents burn-in of ePaper displays)
|
||||||
|
if (mcp1.digitalRead(0) == LOW)
|
||||||
|
{
|
||||||
|
setFgColor(GxEPD_BLACK);
|
||||||
|
setBgColor(GxEPD_WHITE);
|
||||||
|
|
||||||
|
epdContent = {" ", " ", " ", " ", " ", " ", " "};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
epdContent = {"B", "T", "C", "L", "O", "C", "K"};
|
epdContent = {"B", "T", "C", "L", "O", "C", "K"};
|
||||||
|
}
|
||||||
|
|
||||||
setEpdContent(epdContent);
|
setEpdContent(epdContent);
|
||||||
}
|
}
|
||||||
|
@ -247,7 +259,6 @@ void prepareDisplayUpdateTask(void *pvParameters)
|
||||||
|
|
||||||
showDigit(epdIndex, epdContent[epdIndex].c_str()[0], updatePartial,
|
showDigit(epdIndex, epdContent[epdIndex].c_str()[0], updatePartial,
|
||||||
&FONT_BIG);
|
&FONT_BIG);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue