diff --git a/esp32/build_settings.ini b/esp32/build_settings.ini index c3fe9c1..c066dc2 100644 --- a/esp32/build_settings.ini +++ b/esp32/build_settings.ini @@ -5,5 +5,4 @@ build_flags = -D EMBED_WWW -D SERVE_CONFIG_FILES -D CORS_ORIGIN=\"*\" - -D ENABLE_CORS - ;-D SERIAL_INFO \ No newline at end of file + -D ENABLE_CORS \ No newline at end of file diff --git a/esp32/lib/ESP32-sveltekit/DownloadFirmwareService.cpp b/esp32/lib/ESP32-sveltekit/DownloadFirmwareService.cpp index 749bf49..b99b08b 100644 --- a/esp32/lib/ESP32-sveltekit/DownloadFirmwareService.cpp +++ b/esp32/lib/ESP32-sveltekit/DownloadFirmwareService.cpp @@ -79,9 +79,6 @@ void updateTask(void *param) _socket->emit(EVENT_DOWNLOAD_OTA, output.c_str()); ESP_LOGE("Download OTA", "HTTP Update failed with error (%d): %s", httpUpdate.getLastError(), httpUpdate.getLastErrorString().c_str()); -#ifdef SERIAL_INFO - Serial.printf("HTTP Update failed with error (%d): %s\n", httpUpdate.getLastError(), httpUpdate.getLastErrorString().c_str()); -#endif break; case HTTP_UPDATE_NO_UPDATES: @@ -91,15 +88,9 @@ void updateTask(void *param) _socket->emit(EVENT_DOWNLOAD_OTA, output.c_str()); ESP_LOGE("Download OTA", "HTTP Update failed, has same firmware version"); -#ifdef SERIAL_INFO - Serial.println("HTTP Update failed, has same firmware version"); -#endif break; case HTTP_UPDATE_OK: ESP_LOGI("Download OTA", "HTTP Update successful - Restarting"); -#ifdef SERIAL_INFO - Serial.println("HTTP Update successful - Restarting"); -#endif break; } vTaskDelete(NULL); @@ -135,9 +126,6 @@ esp_err_t DownloadFirmwareService::downloadUpdate(PsychicRequest *request, JsonV String downloadURL = json["download_url"]; ESP_LOGI("Download OTA", "Starting OTA from: %s", downloadURL.c_str()); -#ifdef SERIAL_INFO - Serial.println("Starting OTA from: " + downloadURL); -#endif doc["status"] = "preparing"; doc["progress"] = 0; diff --git a/esp32/lib/ESP32-sveltekit/MqttSettingsService.cpp b/esp32/lib/ESP32-sveltekit/MqttSettingsService.cpp index 881e277..f35e79f 100644 --- a/esp32/lib/ESP32-sveltekit/MqttSettingsService.cpp +++ b/esp32/lib/ESP32-sveltekit/MqttSettingsService.cpp @@ -119,18 +119,12 @@ String MqttSettingsService::getLastError() void MqttSettingsService::onMqttConnect(bool sessionPresent) { ESP_LOGI("MQTT", "Connected to MQTT: %s", _mqttClient.getMqttConfig()->uri); -#ifdef SERIAL_INFO - Serial.printf("Connected to MQTT: %s\n", _mqttClient.getMqttConfig()->uri); -#endif _lastError = "None"; } void MqttSettingsService::onMqttDisconnect(bool sessionPresent) { ESP_LOGI("MQTT", "Disconnected from MQTT."); -#ifdef SERIAL_INFO - Serial.println("Disconnected from MQTT."); -#endif } void MqttSettingsService::onMqttError(esp_mqtt_error_codes_t error) @@ -173,9 +167,6 @@ void MqttSettingsService::configureMqtt() // only connect if WiFi is connected and MQTT is enabled if (_state.enabled && WiFi.isConnected()) { -#ifdef SERIAL_INFO - Serial.println("Connecting to MQTT..."); -#endif _mqttClient.setServer(retainCstr(_state.uri.c_str(), &_retainedHost)); if (_state.username.length() > 0) { diff --git a/esp32/lib/ESP32-sveltekit/NTPSettingsService.cpp b/esp32/lib/ESP32-sveltekit/NTPSettingsService.cpp index 0e0ffe5..3beda25 100644 --- a/esp32/lib/ESP32-sveltekit/NTPSettingsService.cpp +++ b/esp32/lib/ESP32-sveltekit/NTPSettingsService.cpp @@ -49,17 +49,11 @@ void NTPSettingsService::begin() void NTPSettingsService::onStationModeGotIP(WiFiEvent_t event, WiFiEventInfo_t info) { -#ifdef SERIAL_INFO - Serial.println(F("Got IP address, starting NTP Synchronization")); -#endif configureNTP(); } void NTPSettingsService::onStationModeDisconnected(WiFiEvent_t event, WiFiEventInfo_t info) { -#ifdef SERIAL_INFO - Serial.println(F("WiFi connection dropped, stopping NTP.")); -#endif configureNTP(); } @@ -67,9 +61,6 @@ void NTPSettingsService::configureNTP() { if (WiFi.isConnected() && _state.enabled) { -#ifdef SERIAL_INFO - Serial.println(F("Starting NTP...")); -#endif configTzTime(_state.tzFormat.c_str(), _state.server.c_str()); } else diff --git a/esp32/lib/ESP32-sveltekit/SleepService.cpp b/esp32/lib/ESP32-sveltekit/SleepService.cpp index 84e51e0..04857f4 100644 --- a/esp32/lib/ESP32-sveltekit/SleepService.cpp +++ b/esp32/lib/ESP32-sveltekit/SleepService.cpp @@ -42,9 +42,6 @@ esp_err_t SleepService::sleep(PsychicRequest *request) void SleepService::sleepNow() { -#ifdef SERIAL_INFO - Serial.println("Going into deep sleep now"); -#endif ESP_LOGI("SleepService", "Going into deep sleep now"); // Callback for main code sleep preparation if (_callbackSleep != nullptr) @@ -70,10 +67,6 @@ void SleepService::sleepNow() esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF); #endif -#ifdef SERIAL_INFO - Serial.println("Good by!"); -#endif - // Just to be sure delay(100); diff --git a/esp32/lib/ESP32-sveltekit/WiFiSettingsService.cpp b/esp32/lib/ESP32-sveltekit/WiFiSettingsService.cpp index 1077f73..1fc67f6 100644 --- a/esp32/lib/ESP32-sveltekit/WiFiSettingsService.cpp +++ b/esp32/lib/ESP32-sveltekit/WiFiSettingsService.cpp @@ -98,9 +98,6 @@ void WiFiSettingsService::manageSTA() // Connect or reconnect as required if ((WiFi.getMode() & WIFI_STA) == 0) { -#ifdef SERIAL_INFO - Serial.println("Connecting to WiFi..."); -#endif connectToWiFi(); } } diff --git a/esp32/lib/ESP32-sveltekit/WiFiStatus.cpp b/esp32/lib/ESP32-sveltekit/WiFiStatus.cpp index b7f5302..3beb23a 100644 --- a/esp32/lib/ESP32-sveltekit/WiFiStatus.cpp +++ b/esp32/lib/ESP32-sveltekit/WiFiStatus.cpp @@ -37,28 +37,16 @@ void WiFiStatus::begin() void WiFiStatus::onStationModeConnected(WiFiEvent_t event, WiFiEventInfo_t info) { ESP_LOGI("WiFiStatus", "WiFi Connected."); - -#ifdef SERIAL_INFO - Serial.println("WiFi Connected."); -#endif } void WiFiStatus::onStationModeDisconnected(WiFiEvent_t event, WiFiEventInfo_t info) { ESP_LOGI("WiFiStatus", "WiFi Disconnected. Reason code=%d", info.wifi_sta_disconnected.reason); - -#ifdef SERIAL_INFO - Serial.print("WiFi Disconnected. Reason code="); - Serial.println(info.wifi_sta_disconnected.reason); -#endif } void WiFiStatus::onStationModeGotIP(WiFiEvent_t event, WiFiEventInfo_t info) { ESP_LOGI("WiFiStatus", "WiFi Got IP. localIP=%s, hostName=%s", WiFi.localIP().toString().c_str(), WiFi.getHostname()); -#ifdef SERIAL_INFO - Serial.printf("WiFi Got IP. localIP=%s, hostName=%s\r\n", WiFi.localIP().toString().c_str(), WiFi.getHostname()); -#endif } esp_err_t WiFiStatus::wifiStatus(PsychicRequest *request)