Add OLED health function
This commit is contained in:
parent
a8fd9abd49
commit
d772ecfa71
12
src/main.cpp
12
src/main.cpp
@ -37,6 +37,14 @@ void statusMsg(String msg){
|
||||
}while ( disp.nextPage() );
|
||||
}
|
||||
|
||||
void screenRefresh(){
|
||||
// Fill screen
|
||||
disp.setDrawColor(0);
|
||||
disp.drawBox(0, 0, 128, 64);
|
||||
delay(20);
|
||||
disp.setDrawColor(1);
|
||||
}
|
||||
|
||||
void configModeCallback (WiFiManager *myWiFiManager) {
|
||||
Serial.println("Entered config mode");
|
||||
statusMsg("Setup");
|
||||
@ -151,6 +159,10 @@ void loop(void) {
|
||||
disp.setDrawColor(1);
|
||||
drawUI();
|
||||
drawProgress();
|
||||
if(millis() % 500 <= 2){
|
||||
Serial.println("Refreshing");
|
||||
screenRefresh();
|
||||
}
|
||||
}while ( disp.nextPage() );
|
||||
|
||||
// TODO: Replace this with data fetch
|
||||
|
Loading…
Reference in New Issue
Block a user