mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2025-01-03 16:43:47 +01:00
send code "M563 S4" before uploading
This commit is contained in:
parent
67981872aa
commit
5d49ee0c74
@ -161,10 +161,11 @@ export async function slice(target, name, mesh, settings, updateProgress) {
|
|||||||
const file = new File([gcode], 'doodle.gcode', { type: 'plain/text' });
|
const file = new File([gcode], 'doodle.gcode', { type: 'plain/text' });
|
||||||
body.append('file', file);
|
body.append('file', file);
|
||||||
|
|
||||||
await fetchProgress(`http://${settings.ip}/upload`, { method: 'POST', body }, (progess) => {
|
await fetchProgress(`http://${settings.ip}/set?code=M563 S4`, { method: 'GET' });
|
||||||
|
await fetchProgress(`http://${settings.ip}/upload`, { method: 'POST', body }, (progress) => {
|
||||||
updateProgress({
|
updateProgress({
|
||||||
action: 'Uploading',
|
action: 'Uploading',
|
||||||
percentage: currentStep / steps + progess.loaded / progess.total / steps
|
percentage: currentStep / steps + progress.loaded / progress.total / steps
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
currentStep ++;
|
currentStep ++;
|
||||||
@ -193,10 +194,10 @@ export async function slice(target, name, mesh, settings, updateProgress) {
|
|||||||
}).trim()}\n${gcode}`;
|
}).trim()}\n${gcode}`;
|
||||||
body.append('file', file);
|
body.append('file', file);
|
||||||
|
|
||||||
await fetchProgress(reservation.url, { method: 'POST', body }, (progess) => {
|
await fetchProgress(reservation.url, { method: 'POST', body }, (progress) => {
|
||||||
updateProgress({
|
updateProgress({
|
||||||
action: 'Uploading',
|
action: 'Uploading',
|
||||||
percentage: currentStep / steps + progess.loaded / progess.total / steps
|
percentage: currentStep / steps + progress.loaded / progress.total / steps
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
currentStep ++;
|
currentStep ++;
|
||||||
|
Loading…
Reference in New Issue
Block a user