Add OLED health function

This commit is contained in:
Elizabeth Cray 2023-06-08 00:04:08 -04:00
parent a8fd9abd49
commit d772ecfa71

View File

@ -37,6 +37,14 @@ void statusMsg(String msg){
}while ( disp.nextPage() ); }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) { void configModeCallback (WiFiManager *myWiFiManager) {
Serial.println("Entered config mode"); Serial.println("Entered config mode");
statusMsg("Setup"); statusMsg("Setup");
@ -151,6 +159,10 @@ void loop(void) {
disp.setDrawColor(1); disp.setDrawColor(1);
drawUI(); drawUI();
drawProgress(); drawProgress();
if(millis() % 500 <= 2){
Serial.println("Refreshing");
screenRefresh();
}
}while ( disp.nextPage() ); }while ( disp.nextPage() );
// TODO: Replace this with data fetch // TODO: Replace this with data fetch