mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 10:06:14 +08:00
Fix Telnet welcome message refering to ESP3D-TFT
Add support of #define DISABLE_TELNET_WELCOME_MESSAGE to disable welcome message
This commit is contained in:
parent
0bf8188570
commit
412aee442c
@ -169,6 +169,10 @@
|
|||||||
*/
|
*/
|
||||||
#define TELNET_FEATURE
|
#define TELNET_FEATURE
|
||||||
|
|
||||||
|
/* Disable telnet welcome message
|
||||||
|
*/
|
||||||
|
#define DISABLE_TELNET_WELCOME_MESSAGE
|
||||||
|
|
||||||
/* Use Websocket server
|
/* Use Websocket server
|
||||||
* Enable websocket communications
|
* Enable websocket communications
|
||||||
*/
|
*/
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define _VERSION_ESP3D_H
|
#define _VERSION_ESP3D_H
|
||||||
|
|
||||||
// version and sources location
|
// version and sources location
|
||||||
#define FW_VERSION "3.0.0.a234"
|
#define FW_VERSION "3.0.0.a235"
|
||||||
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
||||||
|
|
||||||
#endif //_VERSION_ESP3D_H
|
#endif //_VERSION_ESP3D_H
|
||||||
|
@ -38,10 +38,10 @@ Telnet_Server telnet_server;
|
|||||||
|
|
||||||
#if defined(AUTHENTICATION_FEATURE)
|
#if defined(AUTHENTICATION_FEATURE)
|
||||||
#define TELNET_WELCOME_MESSAGE \
|
#define TELNET_WELCOME_MESSAGE \
|
||||||
";Welcome to ESP3D-TFT V" FW_VERSION \
|
";Welcome to ESP3D V" FW_VERSION \
|
||||||
", please enter a command with credentials.\r\n"
|
", please enter a command with credentials.\r\n"
|
||||||
#else
|
#else
|
||||||
#define TELNET_WELCOME_MESSAGE ";Welcome to ESP3D-TFT V" FW_VERSION ".\r\n"
|
#define TELNET_WELCOME_MESSAGE ";Welcome to ESP3D V" FW_VERSION ".\r\n"
|
||||||
#endif // AUTHENTICATION_FEATURE
|
#endif // AUTHENTICATION_FEATURE
|
||||||
|
|
||||||
void Telnet_Server::closeClient() {
|
void Telnet_Server::closeClient() {
|
||||||
@ -62,9 +62,11 @@ bool Telnet_Server::isConnected() {
|
|||||||
_telnetClients.stop();
|
_telnetClients.stop();
|
||||||
}
|
}
|
||||||
_telnetClients = _telnetserver->accept();
|
_telnetClients = _telnetserver->accept();
|
||||||
|
#ifndef DISABLE_TELNET_WELCOME_MESSAGE
|
||||||
// new client
|
// new client
|
||||||
writeBytes((uint8_t *)TELNET_WELCOME_MESSAGE,
|
writeBytes((uint8_t *)TELNET_WELCOME_MESSAGE,
|
||||||
strlen(TELNET_WELCOME_MESSAGE));
|
strlen(TELNET_WELCOME_MESSAGE));
|
||||||
|
#endif // DISABLE_TELNET_WELCOME_MESSAGE
|
||||||
initAuthentication();
|
initAuthentication();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user