diff --git a/index.html.gz b/index.html.gz index ea6541e8..f17eb016 100644 Binary files a/index.html.gz and b/index.html.gz differ diff --git a/www/js/app.js b/www/js/app.js index c647b7f3..c1d7f13e 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -229,12 +229,16 @@ function update_UI_firmware_target() { document.getElementById('configtablink').style.display = 'block'; document.getElementById('auto_check_control').style.display = 'block'; document.getElementById('motor_off_control').style.display = 'block'; + document.getElementById('progress_btn').style.display = 'block'; + document.getElementById('abort_btn').style.display = 'block'; } else if (target_firmware == "repetier4davinci" ) { fwName = "Repetier for Davinci"; document.getElementById('configtablink').style.display = 'block'; document.getElementById('auto_check_control').style.display = 'block'; document.getElementById('motor_off_control').style.display = 'block'; + document.getElementById('progress_btn').style.display = 'block'; + document.getElementById('abort_btn').style.display = 'block'; } else if (target_firmware == "smoothieware" ) { fwName = "Smoothieware"; @@ -242,11 +246,15 @@ function update_UI_firmware_target() { document.getElementById('config_smoothie_nav').style.display = 'block'; document.getElementById('auto_check_control').style.display = 'block'; document.getElementById('motor_off_control').style.display = 'block'; + document.getElementById('progress_btn').style.display = 'block'; + document.getElementById('abort_btn').style.display = 'block'; } else if (target_firmware == "grbl-embedded" ) { fwName = "GRBL ESP32"; document.getElementById('configtablink').style.display = 'block'; document.getElementById('auto_check_control').style.display = 'none'; + document.getElementById('progress_btn').style.display = 'none'; + document.getElementById('abort_btn').style.display = 'none'; document.getElementById('motor_off_control').style.display = 'none'; document.getElementById('tab_title_configuration').innerHTML= "GRBL configuration"; document.getElementById('tab_printer_configuration').innerHTML= "GRBL"; @@ -257,18 +265,24 @@ function update_UI_firmware_target() { document.getElementById('configtablink').style.display = 'block'; document.getElementById('auto_check_control').style.display = 'block'; document.getElementById('motor_off_control').style.display = 'block'; + document.getElementById('progress_btn').style.display = 'block'; + document.getElementById('abort_btn').style.display = 'block'; } else if (target_firmware == "marlin" ) { fwName = "Marlin"; document.getElementById('configtablink').style.display = 'block'; document.getElementById('auto_check_control').style.display = 'block'; document.getElementById('motor_off_control').style.display = 'block'; + document.getElementById('progress_btn').style.display = 'block'; + document.getElementById('abort_btn').style.display = 'block'; } else if (target_firmware == "marlinkimbra" ) { fwName = "Marlin Kimbra"; document.getElementById('configtablink').style.display = 'block'; document.getElementById('auto_check_control').style.display = 'block'; document.getElementById('motor_off_control').style.display = 'block'; + document.getElementById('progress_btn').style.display = 'block'; + document.getElementById('abort_btn').style.display = 'block'; } else if (target_firmware == "grbl" ) { fwName = "Grbl"; @@ -278,6 +292,8 @@ function update_UI_firmware_target() { document.getElementById('files_input_file').accept = " .g, .gco, .gcode, .txt, .ncc, .G, .GCO, .GCODE, .TXT, .NC"; document.getElementById('auto_check_control').style.display = 'none'; document.getElementById('motor_off_control').style.display = 'none'; + document.getElementById('progress_btn').style.display = 'none'; + document.getElementById('abort_btn').style.display = 'none'; } else { fwName = "Unknown"; diff --git a/www/js/controls.js b/www/js/controls.js index 9d9898e6..2fc111e1 100644 --- a/www/js/controls.js +++ b/www/js/controls.js @@ -103,14 +103,10 @@ else { function get_Position(){ var command = "M114"; - if ((target_firmware == "grbl") || (target_firmware == "grbl-embedded")) command = "?"; - //removeIf(production) - var response = "ok C: X:0.0000 Y:0.0000 Z:0.0000 E:0.0000 "; - if (target_firmware == "grbl") response = ""; - process_Position(response); - return; - //endRemoveIf(production) - SendPrinterCommand(command, false, process_Position,null, 114, 1); + if ((target_firmware == "grbl") || (target_firmware == "grbl-embedded")) { + command = "?"; + SendPrinterCommand(command, false, null,null, 114, 1); + } else SendPrinterCommand(command, false, process_Position,null, 114, 1); } function Control_get_position_value(label, result_data) { @@ -128,14 +124,7 @@ function get_Position(){ function process_Position(response){ if ((target_firmware == "grbl") || (target_firmware == "grbl-embedded")){ - var tab1 = response.split("WPos:"); - if (tab1.length >1) { - var tab2 = tab1[1].split("|"); - var tab3 = tab2[0].split(","); - document.getElementById('control_x_position').innerHTML = tab3[0]; - if (tab3.length > 1) document.getElementById('control_y_position').innerHTML = tab3[1]; - if (tab3.length > 2) document.getElementById('control_z_position').innerHTML = tab3[2]; - } + process_grbl_position(response); } else { document.getElementById('control_x_position').innerHTML = Control_get_position_value("X:", response); document.getElementById('control_y_position').innerHTML = Control_get_position_value("Y:", response); diff --git a/www/js/grbl.js b/www/js/grbl.js index 777b52fa..ca3713c1 100644 --- a/www/js/grbl.js +++ b/www/js/grbl.js @@ -88,6 +88,10 @@ function process_grbl_SD(response){ } } +function SendRealtimeCmd(cmd){ + SendPrinterCommand(cmd, false, null,null, cmd.charCodeAt(0), 1); +} + function process_status(response){ process_grbl_position(response); process_grbl_status(response); diff --git a/www/js/printercmd.js b/www/js/printercmd.js index 4f8dc515..fbec73a1 100644 --- a/www/js/printercmd.js +++ b/www/js/printercmd.js @@ -39,6 +39,7 @@ function SendPrinterSilentCommandSuccess(response){ function SendPrinterCommandSuccess(response){ + if ((target_firmware == "grbl") || (target_firmware == "grbl-embedded")) return; if (response[response.length-1] != '\n')Monitor_output_Update(response + "\n"); else Monitor_output_Update(response); } diff --git a/www/sub/files.html b/www/sub/files.html index be040419..1c88cf71 100644 --- a/www/sub/files.html +++ b/www/sub/files.html @@ -49,7 +49,7 @@ - + diff --git a/www/sub/grblpanel.html b/www/sub/grblpanel.html index 82557d03..f4de2ac4 100644 --- a/www/sub/grblpanel.html +++ b/www/sub/grblpanel.html @@ -25,5 +25,8 @@
+ + +