mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-31 09:27:16 +02:00
Notify write succes on oled
Disable led bar Decrease oled brightness
This commit is contained in:
@ -185,9 +185,6 @@ void setup() {
|
|||||||
if (ag->isOne()) {
|
if (ag->isOne()) {
|
||||||
oledDisplay.setText("Warming Up", "Serial Number:", ag->deviceId().c_str());
|
oledDisplay.setText("Warming Up", "Serial Number:", ag->deviceId().c_str());
|
||||||
delay(DISPLAY_DELAY_SHOW_CONTENT_MS);
|
delay(DISPLAY_DELAY_SHOW_CONTENT_MS);
|
||||||
|
|
||||||
// Serial.println("Display brightness: " + String(configuration.getDisplayBrightness()));
|
|
||||||
// oledDisplay.setBrightness(configuration.getDisplayBrightness());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oledDisplay.setText("Offline Storage Mode", "Connecting to", "default WiFi");
|
oledDisplay.setText("Offline Storage Mode", "Connecting to", "default WiFi");
|
||||||
@ -628,6 +625,7 @@ static void oneIndoorInit(void) {
|
|||||||
|
|
||||||
/** Display init */
|
/** Display init */
|
||||||
oledDisplay.begin();
|
oledDisplay.begin();
|
||||||
|
oledDisplay.setBrightness(40);
|
||||||
|
|
||||||
/** Show boot display */
|
/** Show boot display */
|
||||||
Serial.println("Firmware Version: " + ag->getVersion());
|
Serial.println("Firmware Version: " + ag->getVersion());
|
||||||
@ -935,7 +933,7 @@ static void updateDisplayAndLedBar(void) {
|
|||||||
} else {
|
} else {
|
||||||
stateMachine.displayHandle(AgStateMachineWiFiLost);
|
stateMachine.displayHandle(AgStateMachineWiFiLost);
|
||||||
}
|
}
|
||||||
stateMachine.handleLeds(AgStateMachineNormal);
|
// stateMachine.handleLeds(AgStateMachineNormal);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1195,30 +1193,9 @@ int calculateMaxPeriod(int updateInterval) {
|
|||||||
|
|
||||||
void offlineStorageUpdate() {
|
void offlineStorageUpdate() {
|
||||||
if (measurements.saveLocalStorage(*ag, configuration)) {
|
if (measurements.saveLocalStorage(*ag, configuration)) {
|
||||||
// blue
|
oledDisplay.setText("", "New Measurements", "");
|
||||||
ag->ledBar.setColor(0, 0, 255, 0);
|
|
||||||
ag->ledBar.show();
|
|
||||||
delay(250);
|
|
||||||
ag->ledBar.setColor(0, 0, 0, 0);
|
|
||||||
ag->ledBar.show();
|
|
||||||
delay(250);
|
|
||||||
ag->ledBar.setColor(0, 0, 255, 0);
|
|
||||||
ag->ledBar.show();
|
|
||||||
delay(250);
|
|
||||||
ag->ledBar.setColor(0, 0, 0, 0);
|
|
||||||
ag->ledBar.show();
|
|
||||||
} else {
|
} else {
|
||||||
// red
|
oledDisplay.setText("Failed write", "Measurements", "");
|
||||||
ag->ledBar.setColor(255, 0, 0, 0);
|
|
||||||
ag->ledBar.show();
|
|
||||||
delay(250);
|
|
||||||
ag->ledBar.setColor(0, 0, 0, 0);
|
|
||||||
ag->ledBar.show();
|
|
||||||
delay(250);
|
|
||||||
ag->ledBar.setColor(255, 0, 0, 0);
|
|
||||||
ag->ledBar.show();
|
|
||||||
delay(250);
|
|
||||||
ag->ledBar.setColor(0, 0, 0, 0);
|
|
||||||
ag->ledBar.show();
|
|
||||||
}
|
}
|
||||||
|
delay(1200);
|
||||||
}
|
}
|
@ -1074,6 +1074,7 @@ bool Measurements::resetLocalStorage() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Serial.println("Success reset local storage");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user