mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-29 16:37:17 +02:00
Update show mesage on display
This commit is contained in:
@ -166,16 +166,6 @@ void setup() {
|
|||||||
/** Connecting wifi */
|
/** Connecting wifi */
|
||||||
bool connectToWifi = false;
|
bool connectToWifi = false;
|
||||||
if (ag->isOne()) {
|
if (ag->isOne()) {
|
||||||
if (ledBarButtonTest) {
|
|
||||||
if (ag->button.getState() == PushButton::BUTTON_PRESSED) {
|
|
||||||
WiFi.begin("airgradient", "cleanair");
|
|
||||||
Serial.println("WiFi Credential reset to factory defaults");
|
|
||||||
ESP.restart();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ledBarEnabledUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Show message confirm offline mode, should me perform if LED bar button
|
/** Show message confirm offline mode, should me perform if LED bar button
|
||||||
* test pressed */
|
* test pressed */
|
||||||
if (ledBarButtonTest == false) {
|
if (ledBarButtonTest == false) {
|
||||||
@ -432,6 +422,7 @@ static void factoryConfigReset(void) {
|
|||||||
Serial.println("Factory reset successful");
|
Serial.println("Factory reset successful");
|
||||||
}
|
}
|
||||||
delay(3000);
|
delay(3000);
|
||||||
|
oledDisplay.setText("","","");
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -664,6 +655,24 @@ static void oneIndoorInit(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Check for button to reset WiFi connecto to "airgraident" after test LED
|
||||||
|
* bar */
|
||||||
|
if (ledBarButtonTest) {
|
||||||
|
if (ag->button.getState() == ag->button.BUTTON_PRESSED) {
|
||||||
|
WiFi.begin("airgradient", "cleanair");
|
||||||
|
oledDisplay.setText("Configure WiFi", "connect to", "\'airgradient\'");
|
||||||
|
delay(2500);
|
||||||
|
oledDisplay.setText("Rebooting...", "","");
|
||||||
|
delay(2500);
|
||||||
|
oledDisplay.setText("","","");
|
||||||
|
ESP.restart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ledBarEnabledUpdate();
|
||||||
|
|
||||||
|
/** Show message init sensor */
|
||||||
|
oledDisplay.setText("Sensor", "initializing...", "");
|
||||||
|
|
||||||
/** Init sensor SGP41 */
|
/** Init sensor SGP41 */
|
||||||
if (sgp41Init() == false) {
|
if (sgp41Init() == false) {
|
||||||
dispSensorNotFound("SGP41");
|
dispSensorNotFound("SGP41");
|
||||||
|
Reference in New Issue
Block a user