1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-02 02:42:36 +02:00

Merge pull request #130 from luc-github/Devt

Fix realtime command with not printable char not properly interpreted
This commit is contained in:
bdring
2019-04-28 12:20:27 -05:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

Binary file not shown.

View File

@@ -522,6 +522,10 @@ void Web_Server::handle_web_command ()
uint8_t sindex = 0;
scmd = get_Splited_Value(cmd,'\n', sindex);
while ( scmd != "" ){
if ((scmd.length() == 2) && (scmd[0] == 0xC2)){
scmd[0]=scmd[1];
scmd.remove(1,1);
}
if (scmd.length() > 1)scmd += "\n";
else if (!is_realtime_cmd(scmd[0]) )scmd += "\n";
if (!Serial2Socket.push(scmd.c_str()))res = "Error";