0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-06-25 20:51:22 +02:00

Also showing warning when gcode file is to big

This commit is contained in:
peteruithoven 2013-10-23 16:45:24 +02:00
parent 580b0ef33e
commit 2b319c5dd6

View File

@ -46,7 +46,7 @@ function Printer() {
this.retryStopDelay; // retry setTimout instance
this.retryPreheatDelay; // retry setTimout instance
this.maxGCodeSize = 10; // max size of gcode in MB's (estimation)
Printer.MAX_GCODE_SIZE = 10; // max size of gcode in MB's (estimation)
this.stateOverruled = false;
@ -121,7 +121,8 @@ function Printer() {
var gcodeSize = gcodeLineSize*gcode.length/1024/1024; // estimate gcode size in MB's
console.log(" gcodeSize: ",gcodeSize);
if(gcodeSize > this.maxGCodeSize) {
if(gcodeSize > Printer.MAX_GCODE_SIZE) {
alert("Error: Printer:print: gcode file is probably to big ("+gcodeSize+"MB) (max: "+this.maxGCodeSize+"MB)");
console.log("Error: Printer:print: gcode file is probably to big ("+gcodeSize+"MB) (max: "+this.maxGCodeSize+"MB)");
return;
}