code cleaning

This commit is contained in:
Luc 2021-01-21 13:41:09 +01:00
parent 4633374121
commit c1816d512d
2 changed files with 2 additions and 18 deletions

View File

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

View File

@ -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