Add OLED health function

This commit is contained in:
Elizabeth Cray 2023-06-08 00:04:08 -04:00
parent a8fd9abd49
commit d772ecfa71
1 changed files with 12 additions and 0 deletions

View File

@ -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