From d63d34f86093d4737e13e6e7433dbbc189bf6be6 Mon Sep 17 00:00:00 2001 From: Torsten Date: Sun, 4 Jul 2021 22:18:50 +0300 Subject: [PATCH] only prinln debug --- fan_control/include/serial.hpp | 1 - fan_control/src/collector.cpp | 6 ++---- fan_control/src/main.cpp | 3 +-- fan_control/src/ota.cpp | 2 +- fan_control/src/server.cpp | 1 - 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/fan_control/include/serial.hpp b/fan_control/include/serial.hpp index 8c162e1..0a74fe4 100644 --- a/fan_control/include/serial.hpp +++ b/fan_control/include/serial.hpp @@ -5,7 +5,6 @@ class WsSerial{ std::list debug; public: - inline void print(const String& line){ println(line); } inline void println(const String& line){ // enable debug the debugging Serial.println(line.c_str()); diff --git a/fan_control/src/collector.cpp b/fan_control/src/collector.cpp index c99be7d..6dc9ab7 100644 --- a/fan_control/src/collector.cpp +++ b/fan_control/src/collector.cpp @@ -50,10 +50,8 @@ void collector_loop(){ // Get temperature event and print its value. float in = dht_in.readTemperature(); float out = dht_out.readTemperature(); - DEBUG_OUT.print(F("Temperature inside: ")); - DEBUG_OUT.println(in); - DEBUG_OUT.print(F("Temperature outside: ")); - DEBUG_OUT.println(out); + DEBUG_OUT.println(String("Temperature inside: ") + String(in)); + DEBUG_OUT.println(String("Temperature outside: " + String(out))); collector.add(in , out); } diff --git a/fan_control/src/main.cpp b/fan_control/src/main.cpp index d7c86f7..044b8e3 100644 --- a/fan_control/src/main.cpp +++ b/fan_control/src/main.cpp @@ -14,8 +14,7 @@ void setup() { server_setup(); collector_setup(); DEBUG_OUT.println(F("Setup done")); - DEBUG_OUT.print("IP address: "); - DEBUG_OUT.println(WiFi.softAPIP().toString()); + DEBUG_OUT.println(String("IP address: ") + WiFi.softAPIP().toString()); } void loop() { diff --git a/fan_control/src/ota.cpp b/fan_control/src/ota.cpp index 850eeeb..db4918b 100644 --- a/fan_control/src/ota.cpp +++ b/fan_control/src/ota.cpp @@ -45,7 +45,7 @@ void ota_setup(const char* ssid) { DEBUG_OUT.println("Progress:" +String(progress / (total / 100))); }); 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"); else if (error == OTA_BEGIN_ERROR) DEBUG_OUT.println("Begin Failed"); else if (error == OTA_CONNECT_ERROR) DEBUG_OUT.println("Connect Failed"); diff --git a/fan_control/src/server.cpp b/fan_control/src/server.cpp index 76b3c3d..40e6e1f 100644 --- a/fan_control/src/server.cpp +++ b/fan_control/src/server.cpp @@ -80,7 +80,6 @@ void server_setup(){ }); 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 { if(debug_out.empty()) return 0; String to_send = String();