From 46b82f7995942f5651141ce463c2d6900665d15a Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 11 Jan 2023 11:32:20 +0100 Subject: [PATCH] code cleanup --- src/abfall.cpp | 2 +- src/http_client.cpp | 3 +-- src/utils.cpp | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/abfall.cpp b/src/abfall.cpp index f914b7c..c4b21e9 100644 --- a/src/abfall.cpp +++ b/src/abfall.cpp @@ -30,8 +30,8 @@ int main() { #ifdef DEBUG printf("!!! DEBUG mode !!!\n"); -#endif printf("Firmware version: %s\n", PROJECT_VERSION); +#endif wifi_enable(); // Enable Wifi in order to set time and retrieve data diff --git a/src/http_client.cpp b/src/http_client.cpp index 9ea3e99..c899c6c 100644 --- a/src/http_client.cpp +++ b/src/http_client.cpp @@ -1,6 +1,5 @@ #include "http_client.h" -#include #include std::unique_ptr myBodyBuffer = nullptr; @@ -72,7 +71,7 @@ std::string HttpClient::retrieveWasteDatesAsCsv() { received = false; #ifdef DEBUG - std::cout << result << std::endl; + printf("%s", result.c_str()); #endif return result; diff --git a/src/utils.cpp b/src/utils.cpp index 8a97c95..5584cb0 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -213,7 +213,9 @@ void recover_from_sleep(uint scb_orig, uint clock0_orig, uint clock1_orig) { } void perform_sleep(datetime_t &untilDt) { +#ifdef DEBUG printf("Going to sleep...\n"); +#endif uart_default_tx_wait_blocking(); sleep_goto_sleep_until(&untilDt, nullptr);