mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-02 10:53:01 +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:
Binary file not shown.
@@ -522,6 +522,10 @@ void Web_Server::handle_web_command ()
|
|||||||
uint8_t sindex = 0;
|
uint8_t sindex = 0;
|
||||||
scmd = get_Splited_Value(cmd,'\n', sindex);
|
scmd = get_Splited_Value(cmd,'\n', sindex);
|
||||||
while ( scmd != "" ){
|
while ( scmd != "" ){
|
||||||
|
if ((scmd.length() == 2) && (scmd[0] == 0xC2)){
|
||||||
|
scmd[0]=scmd[1];
|
||||||
|
scmd.remove(1,1);
|
||||||
|
}
|
||||||
if (scmd.length() > 1)scmd += "\n";
|
if (scmd.length() > 1)scmd += "\n";
|
||||||
else if (!is_realtime_cmd(scmd[0]) )scmd += "\n";
|
else if (!is_realtime_cmd(scmd[0]) )scmd += "\n";
|
||||||
if (!Serial2Socket.push(scmd.c_str()))res = "Error";
|
if (!Serial2Socket.push(scmd.c_str()))res = "Error";
|
||||||
|
Reference in New Issue
Block a user