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