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:
parent
2e3b174d3b
commit
0500c37bc7
@ -69,7 +69,7 @@ export default class Doodle3DBox extends EventDispatcher {
|
|||||||
|
|
||||||
// const progress = await this.printer.progress();
|
// const progress = await this.printer.progress();
|
||||||
|
|
||||||
await this._sendBatch(batch, start);
|
await this._sendBatch(batch, start, index);
|
||||||
|
|
||||||
start = false;
|
start = false;
|
||||||
lastIndex = index + 1; //skip next \n
|
lastIndex = index + 1; //skip next \n
|
||||||
@ -92,7 +92,7 @@ export default class Doodle3DBox extends EventDispatcher {
|
|||||||
await sleep(this.updateInterval);
|
await sleep(this.updateInterval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async _sendBatch(gcode, start) {
|
async _sendBatch(gcode, start, index) {
|
||||||
try {
|
try {
|
||||||
const response = await this.printer.print(gcode, start, start);
|
const response = await this.printer.print(gcode, start, start);
|
||||||
// maybe do something with failing response
|
// maybe do something with failing response
|
||||||
|
Loading…
Reference in New Issue
Block a user