only prinln debug

This commit is contained in:
Torsten 2021-07-04 22:18:50 +03:00
parent ed235876b1
commit d63d34f860
5 changed files with 4 additions and 9 deletions

View File

@ -5,7 +5,6 @@ class WsSerial{
std::list<String> 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());

View File

@ -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);
}

View File

@ -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() {

View File

@ -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");

View File

@ -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();