Skip to content

Commit 38ec3cc

Browse files
committed
Fix blocking M117 is blocking full serial
1 parent e6f1d5b commit 38ec3cc

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020

2121
//version and sources location
22-
#define FW_VERSION "2.0.0.c19"
22+
#define FW_VERSION "2.0.0.c20"
2323
#define REPOSITORY "https://github.com/luc-github/ESP3D"
2424

2525
//Customize ESP3D ////////////////////////////////////////////////////////////////////////

src/espcom.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ size_t ESPCOM::available(tpipe output){
141141
}
142142
}
143143
size_t ESPCOM::write(tpipe output, uint8_t d){
144-
if ((DEFAULT_PRINTER_PIPE == output) && (block_2_printer || CONFIG::is_locked(FLAG_BLOCK_M117))) return 0;
144+
if ((DEFAULT_PRINTER_PIPE == output) && (block_2_printer || CONFIG::is_locked(FLAG_BLOCK_SERIAL))) return 0;
145145
if ((SERIAL_PIPE == output) && CONFIG::is_locked(FLAG_BLOCK_SERIAL))return 0;
146146
switch (output) {
147147
#ifdef USE_SERIAL_0
@@ -213,7 +213,7 @@ void ESPCOM::print (String & data, tpipe output, ESPResponseStream *espresponse
213213
}
214214
void ESPCOM::print (const char * data, tpipe output, ESPResponseStream *espresponse)
215215
{
216-
if ((DEFAULT_PRINTER_PIPE == output) && ( block_2_printer || CONFIG::is_locked(FLAG_BLOCK_M117))) return;
216+
if ((DEFAULT_PRINTER_PIPE == output) && ( block_2_printer || CONFIG::is_locked(FLAG_BLOCK_SERIAL))) return;
217217
if ((SERIAL_PIPE == output) && CONFIG::is_locked(FLAG_BLOCK_SERIAL))return;
218218
#ifdef TCP_IP_DATA_FEATURE
219219
if ((TCP_PIPE == output) && CONFIG::is_locked(FLAG_BLOCK_TCP))return;
@@ -297,8 +297,10 @@ void ESPCOM::print (const char * data, tpipe output, ESPResponseStream *espresp
297297
OLED_DISPLAY::setCursor(0, 48);
298298
if(!(!strcmp(data,"\n")||!strcmp(data,"\r")||!strcmp(data,"\r\n")))ESPCOM::print(data, OLED_PIPE);
299299
#endif
300-
if(!(!strcmp(data,"\n")||!strcmp(data,"\r")||!strcmp(data,"\r\n")))ESPCOM::print ("M117 ", DEFAULT_PRINTER_PIPE);
301-
ESPCOM::print (data, DEFAULT_PRINTER_PIPE);
300+
if (!CONFIG::is_locked(FLAG_BLOCK_M117)){
301+
if(!(!strcmp(data,"\n")||!strcmp(data,"\r")||!strcmp(data,"\r\n")))ESPCOM::print ("M117 ", DEFAULT_PRINTER_PIPE);
302+
ESPCOM::print (data, DEFAULT_PRINTER_PIPE);
303+
}
302304
}
303305
break;
304306
default:

0 commit comments

Comments
 (0)