@@ -141,7 +141,7 @@ size_t ESPCOM::available(tpipe output){
141
141
}
142
142
}
143
143
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 ;
145
145
if ((SERIAL_PIPE == output) && CONFIG::is_locked (FLAG_BLOCK_SERIAL))return 0 ;
146
146
switch (output) {
147
147
#ifdef USE_SERIAL_0
@@ -213,7 +213,7 @@ void ESPCOM::print (String & data, tpipe output, ESPResponseStream *espresponse
213
213
}
214
214
void ESPCOM::print (const char * data, tpipe output, ESPResponseStream *espresponse)
215
215
{
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 ;
217
217
if ((SERIAL_PIPE == output) && CONFIG::is_locked (FLAG_BLOCK_SERIAL))return ;
218
218
#ifdef TCP_IP_DATA_FEATURE
219
219
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
297
297
OLED_DISPLAY::setCursor (0 , 48 );
298
298
if (!(!strcmp (data," \n " )||!strcmp (data," \r " )||!strcmp (data," \r\n " )))ESPCOM::print (data, OLED_PIPE);
299
299
#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
+ }
302
304
}
303
305
break ;
304
306
default :
0 commit comments