From a27045080fb518848d8961494b61884cfd4612f8 Mon Sep 17 00:00:00 2001 From: Luc Date: Sat, 26 Oct 2019 09:31:07 +0200 Subject: [PATCH] code formating --- esp3d/src/core/espcmd/ESP181.cpp | 2 +- esp3d/src/modules/filesystem/sd/sd_native_esp8266.cpp | 6 ++---- esp3d/src/modules/filesystem/sd/sd_sdfat_esp32.cpp | 6 ++---- esp3d/src/modules/http/handles/handle-SD-files.cpp | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/esp3d/src/core/espcmd/ESP181.cpp b/esp3d/src/core/espcmd/ESP181.cpp index 13b302db..7dba49a7 100644 --- a/esp3d/src/core/espcmd/ESP181.cpp +++ b/esp3d/src/core/espcmd/ESP181.cpp @@ -101,7 +101,7 @@ bool Commands::ESP181(const char* cmd_params, level_authenticate_type auth_type, response = false; } } - + } return response; } diff --git a/esp3d/src/modules/filesystem/sd/sd_native_esp8266.cpp b/esp3d/src/modules/filesystem/sd/sd_native_esp8266.cpp index b95e9253..57134f4c 100644 --- a/esp3d/src/modules/filesystem/sd/sd_native_esp8266.cpp +++ b/esp3d/src/modules/filesystem/sd/sd_native_esp8266.cpp @@ -86,11 +86,9 @@ uint8_t ESP_SD::getState(bool refresh) if (!refresh) { return _state; //to avoid refresh=true + busy to reset SD and waste time } -//SD is idle or not detected, let see if still the case - + //SD is idle or not detected, let see if still the case _state = ESP_SDCARD_NOT_PRESENT; -//using default value for speed ? should be parameter -//refresh content if card was removed + //refresh content if card was removed if (SD.begin((ESP_SD_CS_PIN == -1)?SS:ESP_SD_CS_PIN, SD_SCK_HZ(F_CPU/_spi_speed_divider))) { if (SD.card()->cardSize() > 0 ) { _state = ESP_SDCARD_IDLE; diff --git a/esp3d/src/modules/filesystem/sd/sd_sdfat_esp32.cpp b/esp3d/src/modules/filesystem/sd/sd_sdfat_esp32.cpp index 71aee69f..d497dd98 100644 --- a/esp3d/src/modules/filesystem/sd/sd_sdfat_esp32.cpp +++ b/esp3d/src/modules/filesystem/sd/sd_sdfat_esp32.cpp @@ -85,11 +85,9 @@ uint8_t ESP_SD::getState(bool refresh) if (!refresh) { return _state; //to avoid refresh=true + busy to reset SD and waste time } -//SD is idle or not detected, let see if still the case - + //SD is idle or not detected, let see if still the case _state = ESP_SDCARD_NOT_PRESENT; -//using default value for speed ? should be parameter -//refresh content if card was removed + //refresh content if card was removed if (SD.begin((ESP_SD_CS_PIN == -1)?SS:ESP_SD_CS_PIN, SD_SCK_MHZ(FREQMZ/_spi_speed_divider))) { if (SD.card()->cardSize() > 0 ) { _state = ESP_SDCARD_IDLE; diff --git a/esp3d/src/modules/http/handles/handle-SD-files.cpp b/esp3d/src/modules/http/handles/handle-SD-files.cpp index 5321b8f2..83d133fc 100644 --- a/esp3d/src/modules/http/handles/handle-SD-files.cpp +++ b/esp3d/src/modules/http/handles/handle-SD-files.cpp @@ -55,7 +55,7 @@ void HTTP_Server::handleSDFileList () return; } } - + //get current path if (_webserver->hasArg ("path") ) { path += _webserver->arg ("path") ;