mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-13 00:29:06 +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
|
||||
|
||||
/* Disable telnet welcome message
|
||||
*/
|
||||
#define DISABLE_TELNET_WELCOME_MESSAGE
|
||||
|
||||
/* Use Websocket server
|
||||
* Enable websocket communications
|
||||
*/
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define _VERSION_ESP3D_H
|
||||
|
||||
// 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"
|
||||
|
||||
#endif //_VERSION_ESP3D_H
|
||||
|
@ -38,10 +38,10 @@ Telnet_Server telnet_server;
|
||||
|
||||
#if defined(AUTHENTICATION_FEATURE)
|
||||
#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"
|
||||
#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
|
||||
|
||||
void Telnet_Server::closeClient() {
|
||||
@ -62,9 +62,11 @@ bool Telnet_Server::isConnected() {
|
||||
_telnetClients.stop();
|
||||
}
|
||||
_telnetClients = _telnetserver->accept();
|
||||
#ifndef DISABLE_TELNET_WELCOME_MESSAGE
|
||||
// new client
|
||||
writeBytes((uint8_t *)TELNET_WELCOME_MESSAGE,
|
||||
strlen(TELNET_WELCOME_MESSAGE));
|
||||
#endif // DISABLE_TELNET_WELCOME_MESSAGE
|
||||
initAuthentication();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user