From 3331c47927f5463b0ced02e7b417ac6bb16ce159 Mon Sep 17 00:00:00 2001 From: Luc <8822552+luc-github@users.noreply.github.com> Date: Wed, 24 Aug 2022 11:50:44 +0800 Subject: [PATCH] Sync with ESP3DLib latest cleaning Add mDNS code_base label (ESP3D/ESP3DLib) Remove outdated flags in ESP inline command line help Bump version --- esp3d/src/core/espcmd/ESP0.cpp | 6 +-- .../include/Marlin/FlushableHardwareSerial.h | 38 ------------------- esp3d/src/include/esp3d_config.h | 3 +- esp3d/src/include/version.h | 2 +- esp3d/src/modules/mDNS/mDNS.cpp | 2 +- 5 files changed, 7 insertions(+), 44 deletions(-) delete mode 100644 esp3d/src/include/Marlin/FlushableHardwareSerial.h diff --git a/esp3d/src/core/espcmd/ESP0.cpp b/esp3d/src/core/espcmd/ESP0.cpp index 9106d7b0..ff722496 100644 --- a/esp3d/src/core/espcmd/ESP0.cpp +++ b/esp3d/src/core/espcmd/ESP0.cpp @@ -109,9 +109,9 @@ const char * help[]= {"[ESP] (id) - display this help", "[ESP402](State) - display/set check update at boot from SD which can be ON, OFF", #endif //SD_UPDATE_FEATURE #if defined (WIFI_FEATURE) - "[ESP410](plain) - display available AP list (limited to 30) in plain/JSON", + "[ESP410]display available AP list (limited to 30) in plain/JSON", #endif //WIFI_FEATURE - "[ESP420](plain) - display ESP3D current status in plain/JSON", + "[ESP420]display ESP3D current status in plain/JSON", "[ESP444](Cmd) - set ESP3D state (RESET/RESTART)", #ifdef MDNS_FEATURE "[ESP450]display ESP3D list on network", @@ -147,7 +147,7 @@ const char * help[]= {"[ESP] (id) - display this help", "[ESP780](path) - List Global Filesystem", "[ESP790](Action)=(path) - rmdir / remove / mkdir / exists / create on Global Filesystem (path)", #endif //GLOBAL_FILESYSTEM_FEATURE - "[ESP800](plain)(time=YYYY-MM-DD-HH-MM-SS) - display FW Informations in plain/JSON", + "[ESP800](time=YYYY-MM-DD-HH-MM-SS) - display FW Informations in plain/JSON", #if COMMUNICATION_PROTOCOL != SOCKET_SERIAL "[ESP900](ENABLE/DISABLE) - display/set serial state", "[ESP901] - display/set serial baud rate", diff --git a/esp3d/src/include/Marlin/FlushableHardwareSerial.h b/esp3d/src/include/Marlin/FlushableHardwareSerial.h deleted file mode 100644 index 6856dcb4..00000000 --- a/esp3d/src/include/Marlin/FlushableHardwareSerial.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#pragma once -#include "../esp3d_config.h" - -//stripped version - -#if defined (ESP3DLIB_ENV) - -#include -class FlushableHardwareSerial : public HardwareSerial -{ -public: - FlushableHardwareSerial(int uart_nr) : HardwareSerial(uart_nr) {} -}; -extern FlushableHardwareSerial flushableSerial; - -#define MYSERIAL1 flushableSerial -#endif //ESP3DLIB_ENV diff --git a/esp3d/src/include/esp3d_config.h b/esp3d/src/include/esp3d_config.h index 30db6e6d..02486b93 100644 --- a/esp3d/src/include/esp3d_config.h +++ b/esp3d/src/include/esp3d_config.h @@ -25,12 +25,13 @@ #if defined __has_include # if __has_include ("../../configuration.h") #include "../../configuration.h" +#define ESP3D_CODE_BASE "ESP3D" #else #undef DISABLED #undef _BV # if __has_include ("../esp3dlib_config.h") #include "../esp3dlib_config.h" -#include "./Marlin/FlushableHardwareSerial.h" +#define ESP3D_CODE_BASE "ESP3DLib" #else #error "No configuration file found" #endif diff --git a/esp3d/src/include/version.h b/esp3d/src/include/version.h index cd5c66fa..529a324b 100644 --- a/esp3d/src/include/version.h +++ b/esp3d/src/include/version.h @@ -22,7 +22,7 @@ #define _VERSION_ESP3D_H //version and sources location -#define FW_VERSION "3.0.0.a209" +#define FW_VERSION "3.0.0.a210" #define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0" #endif //_VERSION_ESP3D_H diff --git a/esp3d/src/modules/mDNS/mDNS.cpp b/esp3d/src/modules/mDNS/mDNS.cpp index 7703fd98..496ae6f5 100644 --- a/esp3d/src/modules/mDNS/mDNS.cpp +++ b/esp3d/src/modules/mDNS/mDNS.cpp @@ -114,7 +114,7 @@ void mDNS_Service::addESP3DServices(uint16_t port) return; } MDNS.addService(MDNS_SERVICE_NAME, MDNS_SERVICE_TYPE, _port); - MDNS.addServiceTxt(MDNS_SERVICE_NAME, MDNS_SERVICE_TYPE, "firmware", "esp3d"); + MDNS.addServiceTxt(MDNS_SERVICE_NAME, MDNS_SERVICE_TYPE, "firmware", ESP3D_CODE_BASE); MDNS.addServiceTxt(MDNS_SERVICE_NAME, MDNS_SERVICE_TYPE, "version", FW_VERSION); #if defined(ARDUINO_ARCH_ESP8266) _hMDNSServiceQuery = MDNS.installServiceQuery(MDNS_SERVICE_NAME, MDNS_SERVICE_TYPE,MDNSServiceQueryCallback);