Beta fix for Undefined grbl settings

pull/110/head
openbuilds-engineer 2018-08-06 18:56:45 +02:00
rodzic 99b77a6bfd
commit 0d45eee62b
4 zmienionych plików z 18 dodań i 10 usunięć

Wyświetl plik

@ -20,7 +20,7 @@
text-decoration: none;
background-color: #f8f8f8;
color: #a7a7a7;
width: 141px;
width: 161px;
height: 36px;
position: relative;
text-align: right;

Wyświetl plik

@ -326,7 +326,7 @@
</button>
</td>
<td>
<button class="button light jogbtn" style="width: 141px;" id="gotozero">
<button class="button light jogbtn" style="width: 161px;" id="gotozero">
<span class="fa-layers fa-fw">
<i class="fas fa-chart-line fg-grayBlue" data-fa-transform="shrink-2 down-8 left-12"></i>
<span class="fa-layers-text fg-red" data-fa-transform="down-9 right-8" style="font-weight:900; font-family: Arial; font-size: 12px;">X</span>

Wyświetl plik

@ -132,7 +132,7 @@ function setJogPanel(val, status) {
$("#jogcontrols").slideUp("fast");
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 270 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 270 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
// $('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$('.jogbtn').attr('disabled', true);
if ($('#jograte').attr('disabled')) {
@ -143,7 +143,7 @@ function setJogPanel(val, status) {
$("#jogcontrols").slideDown("fast");
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 460 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 500 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
// $('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$('.jogbtn').attr('disabled', false);
if ($('#jograte').attr('disabled')) {
@ -153,7 +153,7 @@ function setJogPanel(val, status) {
// Show panel and resize editor
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 460 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 500 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
// $('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$("#jogcontrols").slideDown("fast");
$('.jogbtn').attr('disabled', true);
@ -165,7 +165,7 @@ function setJogPanel(val, status) {
$("#jogcontrols").slideDown("fast");
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 460 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 500 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
// $('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$('.jogbtn').attr('disabled', true);
if (!$('#jograte').attr('disabled')) {
@ -176,7 +176,7 @@ function setJogPanel(val, status) {
$("#jogcontrols").slideUp("fast");
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 270 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 270 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
// $('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$('.jogbtn').attr('disabled', true);
if (!$('#jograte').attr('disabled')) {

Wyświetl plik

@ -764,8 +764,7 @@ io.on("connection", function(socket) {
}); // end port.onclose
port.on("data", function(data) {
// console.log("DATA RECV: " + data.replace(/(\r\n|\n|\r)/gm, ""));
// console.log()
// Command Tracking
if (lastGcode.length == 0) {
@ -777,11 +776,17 @@ io.on("connection", function(socket) {
}
}
if (data.indexOf("<") === 0) {
command = "?";
}
if (!command) {
command = ""
};
command = command.replace(/(\r\n|\n|\r)/gm, "");
console.log("CMD: " + command + " / DATA RECV: " + data.replace(/(\r\n|\n|\r)/gm, ""));
if (command != "?" && command != "M105" && data.length > 0) {
var string = "";
if (status.comms.sduploading) {
@ -792,6 +797,7 @@ io.on("connection", function(socket) {
'command': command,
'response': string
}
// console.log(output.response)
io.sockets.emit('data', output);
}
@ -1749,7 +1755,9 @@ function machineSend(gcode) {
data.push(status.comms.sduploading)
io.sockets.emit("queueCount", data);
port.write(gcode);
lastGcode.push(gcode);
if (gcode != "?") {
lastGcode.push(gcode);
}
if (gcode == "cat /sd/config\n" || gcode == "cat /sd/config.txt\n") {
// console.log("DUMPING CONFIG ARRAY")
status.machine.firmware.config.length = 0;