only prinln debug
This commit is contained in:
parent
ed235876b1
commit
d63d34f860
@ -5,7 +5,6 @@ class WsSerial{
|
|||||||
std::list<String> debug;
|
std::list<String> debug;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline void print(const String& line){ println(line); }
|
|
||||||
inline void println(const String& line){
|
inline void println(const String& line){
|
||||||
// enable debug the debugging
|
// enable debug the debugging
|
||||||
Serial.println(line.c_str());
|
Serial.println(line.c_str());
|
||||||
|
@ -50,10 +50,8 @@ void collector_loop(){
|
|||||||
// Get temperature event and print its value.
|
// Get temperature event and print its value.
|
||||||
float in = dht_in.readTemperature();
|
float in = dht_in.readTemperature();
|
||||||
float out = dht_out.readTemperature();
|
float out = dht_out.readTemperature();
|
||||||
DEBUG_OUT.print(F("Temperature inside: "));
|
DEBUG_OUT.println(String("Temperature inside: ") + String(in));
|
||||||
DEBUG_OUT.println(in);
|
DEBUG_OUT.println(String("Temperature outside: " + String(out)));
|
||||||
DEBUG_OUT.print(F("Temperature outside: "));
|
|
||||||
DEBUG_OUT.println(out);
|
|
||||||
collector.add(in , out);
|
collector.add(in , out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,8 +14,7 @@ void setup() {
|
|||||||
server_setup();
|
server_setup();
|
||||||
collector_setup();
|
collector_setup();
|
||||||
DEBUG_OUT.println(F("Setup done"));
|
DEBUG_OUT.println(F("Setup done"));
|
||||||
DEBUG_OUT.print("IP address: ");
|
DEBUG_OUT.println(String("IP address: ") + WiFi.softAPIP().toString());
|
||||||
DEBUG_OUT.println(WiFi.softAPIP().toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
@ -45,7 +45,7 @@ void ota_setup(const char* ssid) {
|
|||||||
DEBUG_OUT.println("Progress:" +String(progress / (total / 100)));
|
DEBUG_OUT.println("Progress:" +String(progress / (total / 100)));
|
||||||
});
|
});
|
||||||
ArduinoOTA.onError([](ota_error_t error) {
|
ArduinoOTA.onError([](ota_error_t error) {
|
||||||
DEBUG_OUT.print("Error[" + String(error) + "]: ");
|
DEBUG_OUT.println("Error[" + String(error) + "]: ");
|
||||||
if (error == OTA_AUTH_ERROR) DEBUG_OUT.println("Auth Failed");
|
if (error == OTA_AUTH_ERROR) DEBUG_OUT.println("Auth Failed");
|
||||||
else if (error == OTA_BEGIN_ERROR) DEBUG_OUT.println("Begin Failed");
|
else if (error == OTA_BEGIN_ERROR) DEBUG_OUT.println("Begin Failed");
|
||||||
else if (error == OTA_CONNECT_ERROR) DEBUG_OUT.println("Connect Failed");
|
else if (error == OTA_CONNECT_ERROR) DEBUG_OUT.println("Connect Failed");
|
||||||
|
@ -80,7 +80,6 @@ void server_setup(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
server.on("/log", HTTP_ANY, [](AsyncWebServerRequest * request) {
|
server.on("/log", HTTP_ANY, [](AsyncWebServerRequest * request) {
|
||||||
DEBUG_OUT.println("log start");
|
|
||||||
AsyncWebServerResponse *response = request->beginChunkedResponse("text/html", [](uint8_t *buffer, size_t maxLen, size_t index) -> size_t {
|
AsyncWebServerResponse *response = request->beginChunkedResponse("text/html", [](uint8_t *buffer, size_t maxLen, size_t index) -> size_t {
|
||||||
if(debug_out.empty()) return 0;
|
if(debug_out.empty()) return 0;
|
||||||
String to_send = String();
|
String to_send = String();
|
||||||
|
Loading…
Reference in New Issue
Block a user