diff --git a/esp3d/src/core/debug_esp3d.cpp b/esp3d/src/core/debug_esp3d.cpp index 64892575..444e6d26 100644 --- a/esp3d/src/core/debug_esp3d.cpp +++ b/esp3d/src/core/debug_esp3d.cpp @@ -25,23 +25,6 @@ #define DEBUG_BAUDRATE 115200 #endif //~DEBUG_BAUDRATE -#if defined(ARDUINO_ARCH_ESP8266) -const char * pathToFileName(const char * path) -{ - size_t i = 0; - size_t pos = 0; - char * p = (char *)path; - while(*p) { - i++; - if(*p == '/' || *p == '\\') { - pos = i; - } - p++; - } - return path+pos; -} -#endif //ARDUINO_ARCH_ESP8266 - void initDebug() { #if (ESP_DEBUG_FEATURE == DEBUG_OUTPUT_SERIAL0) || (ESP_DEBUG_FEATURE == DEBUG_OUTPUT_SERIAL1)||(ESP_DEBUG_FEATURE == DEBUG_OUTPUT_SERIAL2) diff --git a/esp3d/src/core/debug_esp3d.h b/esp3d/src/core/debug_esp3d.h index ca452230..913d37e8 100644 --- a/esp3d/src/core/debug_esp3d.h +++ b/esp3d/src/core/debug_esp3d.h @@ -30,7 +30,8 @@ #if defined(ESP_DEBUG_FEATURE) #if defined(ARDUINO_ARCH_ESP8266) -extern const char * pathToFileName(const char * path); +//no need with latest esp8266 core +#define pathToFileName(p) p #endif //ARDUINO_ARCH_ESP8266 #undef log_esp3d #undef log_esp3dS