mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-11 23:29:02 +08:00
Fix javascript compatibility issue on send command
This commit is contained in:
parent
5e81939a57
commit
38d86c5f8a
@ -385,7 +385,8 @@ var XYfeedrate=$XY_FEEDRATE$;
|
||||
var Zfeedrate=$Z_FEEDRATE$;
|
||||
var Efeedrate=$E_FEEDRATE$;
|
||||
|
||||
function Sendcommand(commandtxt, showresult=false){
|
||||
function Sendcommand(commandtxt, showresult){
|
||||
if (typeof showresult === 'undefined')showresult=false
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
var url = "/command?plain="+encodeURIComponent(commandtxt);
|
||||
if (!showresult)url = "/command_silent?plain="+encodeURIComponent(commandtxt);
|
||||
@ -407,7 +408,8 @@ ms += new Date().getTime();
|
||||
while (new Date() < ms){}
|
||||
}
|
||||
|
||||
function SendJogcommand( cmd, feedrate, extra=""){
|
||||
function SendJogcommand( cmd, feedrate, extra){
|
||||
if (typeof extra === 'undefined')extra=""
|
||||
if (extra != ""){
|
||||
Sendcommand(extra);
|
||||
delay(100);
|
||||
|
Loading…
x
Reference in New Issue
Block a user