mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-20 12:12:08 +02:00
[fix] build fail on example BASIC
This commit is contained in:
@ -42,7 +42,6 @@ public:
|
||||
bool hasSensorS8 = true;
|
||||
bool hasSensorPMS1 = true;
|
||||
bool hasSensorPMS2 = true;
|
||||
bool hasSensorPMS = true;
|
||||
bool hasSensorSGP = true;
|
||||
bool hasSensorSHT = true;
|
||||
|
||||
|
@ -20,7 +20,7 @@ String Measurements::toString(bool localServer, AgFirmwareMode fwMode, int rssi,
|
||||
}
|
||||
|
||||
if (ag->isOne() || (ag->getBoardType() == DIY_PRO_INDOOR_V4_2)) {
|
||||
if (config->hasSensorPMS1 || config->hasSensorPMS) {
|
||||
if (config->hasSensorPMS1) {
|
||||
if (this->pm01_1 >= 0) {
|
||||
root["pm01"] = this->pm01_1;
|
||||
}
|
||||
|
@ -24,10 +24,6 @@ WifiConnector::WifiConnector(OledDisplay &disp, Stream &log, StateMachine &sm,
|
||||
Configuration &config)
|
||||
: PrintLog(log, "WifiConnector"), disp(disp), sm(sm), config(config) {}
|
||||
|
||||
// #ifdef ESP8266
|
||||
// WifiConnector::WifiConnector(Stream &log) : PrintLog(log, "WiFiConnector") {}
|
||||
// #endif
|
||||
|
||||
WifiConnector::~WifiConnector() {}
|
||||
|
||||
/**
|
||||
@ -179,24 +175,6 @@ void WifiConnector::disconnect(void) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ESP32
|
||||
#else
|
||||
// void WifiConnector::displayShowText(String ln1, String ln2, String ln3) {
|
||||
// char buf[9];
|
||||
// ag->display.clear();
|
||||
|
||||
// ag->display.setCursor(1, 1);
|
||||
// ag->display.setText(ln1);
|
||||
// ag->display.setCursor(1, 19);
|
||||
// ag->display.setText(ln2);
|
||||
// ag->display.setCursor(1, 37);
|
||||
// ag->display.setText(ln3);
|
||||
|
||||
// ag->display.show();
|
||||
// delay(100);
|
||||
// }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Has wifi STA connected to WIFI softAP (this device)
|
||||
*
|
||||
@ -310,13 +288,15 @@ void WifiConnector::_wifiProcess() {
|
||||
}
|
||||
|
||||
// TODO This is for basic
|
||||
// if (!WiFi.isConnected()) {
|
||||
// disp.setText("Booting", "offline", "mode");
|
||||
// Serial.println("failed to connect and hit timeout");
|
||||
// delay(2500);
|
||||
// } else {
|
||||
// hasConfig = true;
|
||||
// }
|
||||
if (ag->getBoardType() == DIY_BASIC) {
|
||||
if (!WiFi.isConnected()) {
|
||||
// disp.setText("Booting", "offline", "mode");
|
||||
Serial.println("failed to connect and hit timeout");
|
||||
delay(2500);
|
||||
} else {
|
||||
hasConfig = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -340,8 +320,6 @@ void WifiConnector::handle(void) {
|
||||
if (ms >= 10000) {
|
||||
lastRetry = millis();
|
||||
WiFi.reconnect();
|
||||
|
||||
// Serial.printf("Re-Connect WiFi\r\n");
|
||||
logInfo("Re-Connect WiFi");
|
||||
}
|
||||
}
|
||||
|
@ -29,9 +29,6 @@ public:
|
||||
void setAirGradient(AirGradient *ag);
|
||||
|
||||
WifiConnector(OledDisplay &disp, Stream &log, StateMachine &sm, Configuration& config);
|
||||
#ifdef ESP8266
|
||||
// WifiConnector(Stream &log);
|
||||
#endif
|
||||
~WifiConnector();
|
||||
|
||||
bool connect(void);
|
||||
|
Reference in New Issue
Block a user