Skip to content

Commit

Permalink
Use command/plain for all [ESPxxx] commands - FluidNC #1123
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchBradley committed Feb 1, 2024
1 parent 6093f59 commit 3e9cc8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file modified index.html.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion www/js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,8 @@ function files_check_if_upload() {
var canupload = true;
var files = id("files_input_file").files;
if (direct_sd) {
SendPrinterCommand("[ESP200]", false, process_check_sd_presence);
var url = "/command?plain=" + encodeURIComponent("[ESP400]");
SendGetHttp(url, process_check_sd_presence);
} else {
//no reliable way to know SD is present or not so let's upload
files_start_upload();
Expand Down
3 changes: 2 additions & 1 deletion www/js/restartdlg.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ function restartdlg() {
displayBlock('prgrestart');
id('restartmsg').innerHTML = translate_text_item("Restarting, please wait....");
showModal();
SendPrinterCommand("[ESP444]RESTART", false, restart_esp_success, restart_esp_failed);
url = "/command?plain=" + encodeURIComponent("[ESP444]RESTART");
SendGetHttp(url, restart_esp_success, restart_esp_failed);
}

function restart_esp_success(response) {
Expand Down

0 comments on commit 3e9cc8c

Please sign in to comment.