0
0
mirror of https://github.com/Doodle3D/Doodle3D-API synced 2024-12-22 13:53:48 +01:00

pass index argument to sendBatch

This commit is contained in:
casperlamboo 2016-07-20 10:17:37 +02:00
parent 2e3b174d3b
commit 0500c37bc7

View File

@ -69,7 +69,7 @@ export default class Doodle3DBox extends EventDispatcher {
// const progress = await this.printer.progress();
await this._sendBatch(batch, start);
await this._sendBatch(batch, start, index);
start = false;
lastIndex = index + 1; //skip next \n
@ -92,7 +92,7 @@ export default class Doodle3DBox extends EventDispatcher {
await sleep(this.updateInterval);
}
}
async _sendBatch(gcode, start) {
async _sendBatch(gcode, start, index) {
try {
const response = await this.printer.print(gcode, start, start);
// maybe do something with failing response