remove remote as option
This commit is contained in:
parent
c7358494f9
commit
e8f966d3f7
3 changed files with 18 additions and 6 deletions
|
|
@ -144,6 +144,8 @@ var gs_kiri_print = exports;
|
|||
mode = settings.mode;
|
||||
|
||||
if (remote) {
|
||||
|
||||
// executed from kiri.js
|
||||
KIRI.work.printSetup(settings, function(reply) {
|
||||
if (reply.done) {
|
||||
scope.output = reply.output;
|
||||
|
|
@ -152,11 +154,15 @@ var gs_kiri_print = exports;
|
|||
onupdate(reply.update, reply.updateStatus)
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
// executed from kiri-worker.js
|
||||
var driver = KIRI.driver[mode];
|
||||
if (driver) driver.printSetup(scope, onupdate);
|
||||
else console.log({missing_print_driver: mode});
|
||||
ondone();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -166,6 +172,8 @@ var gs_kiri_print = exports;
|
|||
mode = settings.mode;
|
||||
|
||||
if (remote) {
|
||||
|
||||
// executed from kiri.js
|
||||
KIRI.work.printGCode(function(reply) {
|
||||
scope.lines = reply.lines;
|
||||
scope.bytes = reply.bytes;
|
||||
|
|
@ -175,7 +183,10 @@ var gs_kiri_print = exports;
|
|||
ondone(reply.gcode);
|
||||
});
|
||||
return;
|
||||
|
||||
} else {
|
||||
|
||||
// executed from kiri-worker.js
|
||||
var driver = KIRI.driver[mode];
|
||||
if (driver && driver.printExport) {
|
||||
ondone(driver.printExport(scope, online));
|
||||
|
|
@ -183,6 +194,7 @@ var gs_kiri_print = exports;
|
|||
console.log({missing_export_driver: mode});
|
||||
ondone(null);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -536,6 +536,7 @@ var gs_kiri_widget = exports;
|
|||
|
||||
if (remote) {
|
||||
|
||||
// executed from kiri.js
|
||||
KIRI.work.slice(settings, this, function (reply) {
|
||||
if (reply.update) {
|
||||
onupdate(reply.update, reply.updateStatus);
|
||||
|
|
@ -554,6 +555,7 @@ var gs_kiri_widget = exports;
|
|||
|
||||
} else {
|
||||
|
||||
// executed from kiri-worker.js
|
||||
widget.clearSlices();
|
||||
|
||||
var catchdone = function() {
|
||||
|
|
|
|||
10
js/kiri.js
10
js/kiri.js
|
|
@ -455,8 +455,6 @@ self.kiri.license = exports.LICENSE;
|
|||
layoutOnAdd = true,
|
||||
deviceLock = false,
|
||||
local = SETUP.local,
|
||||
sliceRemote = !local,
|
||||
printRemote = !local,
|
||||
mouseMoved = false,
|
||||
camStock = null,
|
||||
camTopZ = 0;
|
||||
|
|
@ -842,7 +840,7 @@ self.kiri.license = exports.LICENSE;
|
|||
}
|
||||
|
||||
currentPrint = kiri.newPrint(settings, WIDGETS);
|
||||
currentPrint.setup(printRemote, function(update, status) {
|
||||
currentPrint.setup(true, function(update, status) {
|
||||
// on update
|
||||
setProgress(update, status);
|
||||
}, function() {
|
||||
|
|
@ -880,7 +878,7 @@ self.kiri.license = exports.LICENSE;
|
|||
preparePrint(exportPrint);
|
||||
return;
|
||||
}
|
||||
currentPrint.exportGCode(printRemote, function(gcode) {
|
||||
currentPrint.exportGCode(true, function(gcode) {
|
||||
exportGCode(gcode);
|
||||
});
|
||||
}
|
||||
|
|
@ -1164,7 +1162,7 @@ self.kiri.license = exports.LICENSE;
|
|||
track = {};
|
||||
|
||||
// require topo be sent back from worker for local printing
|
||||
settings.synth.sendTopo = !printRemote;
|
||||
settings.synth.sendTopo = false;
|
||||
|
||||
setOpacity(slicing_opacity);
|
||||
|
||||
|
|
@ -1224,7 +1222,7 @@ self.kiri.license = exports.LICENSE;
|
|||
totalProgress += (track[w.id] || 0);
|
||||
});
|
||||
setProgress(totalProgress / WIDGETS.length, msg);
|
||||
}, sliceRemote);
|
||||
}, true);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue