fix tool change bug in serial sender
This commit is contained in:
parent
5dad93e8df
commit
ced2f6426a
3 changed files with 10 additions and 5 deletions
|
|
@ -410,8 +410,9 @@ var gs_kiri_fdm = exports;
|
|||
left: offset ? 0 : -device.bedWidth/2,
|
||||
right: offset ? device.bedWidth : device.bedWidth/2,
|
||||
bottom: offset ? 0 : -device.bedDepth/2,
|
||||
kfactor: process.gcodeKFactor || 0,
|
||||
z_max: device.maxHeight,
|
||||
kfactor: process.gcodeKFactor || 0
|
||||
layers: layers.length
|
||||
},
|
||||
seekMMM = process.outputSeekrate * 60,
|
||||
retDist = process.outputRetractDist,
|
||||
|
|
|
|||
|
|
@ -259,8 +259,10 @@ var gs_kiri_serial = exports;
|
|||
var data = msg.data.trim();
|
||||
if (data.charAt(0) === '{') {
|
||||
data = js2o(data);
|
||||
// if (data.Cmd) console.log(data);
|
||||
if (data.Cmd && data.Cmd === 'Queued' && data.Data) queueAck(data.Data);
|
||||
if (data.Cmd) console.log(data);
|
||||
if (data.Cmd && data.Cmd === 'Queued' && data.Data) {
|
||||
queueAck(data.Data);
|
||||
}
|
||||
if (data.QCnt >= 0) {
|
||||
spjsQueueCount = data.QCnt;
|
||||
gcRemoteQueue.value = spjsQueueCount;
|
||||
|
|
@ -390,6 +392,8 @@ var gs_kiri_serial = exports;
|
|||
}
|
||||
}
|
||||
drainQueue();
|
||||
} else {
|
||||
console.log("no gcode to send");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -529,7 +533,6 @@ var gs_kiri_serial = exports;
|
|||
|
||||
while (count++ < sendBatchMax && localQueue.length > 0) {
|
||||
next = (nextID++).toString();
|
||||
waitingForAck.push(next);
|
||||
line = localQueue.shift();
|
||||
if (line.indexOf("M6") === 0) {
|
||||
toolChange = true;
|
||||
|
|
@ -537,6 +540,7 @@ var gs_kiri_serial = exports;
|
|||
// just stop sending until unpaused
|
||||
if (selectedMode === 'grbl') break;
|
||||
}
|
||||
waitingForAck.push(next);
|
||||
data.push({D:line, Id:next});
|
||||
// for tinyg pause after M6 sent
|
||||
if (toolChange) break;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
],
|
||||
"cmd":{
|
||||
"fan_power": "M106 S{fan_speed}",
|
||||
"progress": "M117 {progress}% layer {layer}"
|
||||
"progress": "M117 {progress}% layer {layer} / {layers}"
|
||||
},
|
||||
"settings":{
|
||||
"origin_center": false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue