From ceb89b96649730e5b144dc29557177d8119fa8ca Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 23 Oct 2013 17:41:49 +0200 Subject: [PATCH] Return to idle state when Doodle was to big. --- js_src/Printer.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js_src/Printer.js b/js_src/Printer.js index dcb79d1..ca97176 100644 --- a/js_src/Printer.js +++ b/js_src/Printer.js @@ -122,8 +122,14 @@ function Printer() { console.log(" gcodeSize: ",gcodeSize); 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)"); + alert("Error: Printer:print: gcode file is probably to big ("+gcodeSize+"MB) (max: "+Printer.MAX_GCODE_SIZE+"MB)"); + console.log("Error: Printer:print: gcode file is probably to big ("+gcodeSize+"MB) (max: "+Printer.MAX_GCODE_SIZE+"MB)"); + + this.overruleState(Printer.IDLE_STATE); + this.startStatusCheckInterval(); + message.hide(); + self.removeLeaveWarning(); + return; }