diff --git a/js/main.js b/js/main.js index a6d02ec..ce40827 100644 --- a/js/main.js +++ b/js/main.js @@ -8,6 +8,8 @@ var printer = new Printer(); var thermometer = new Thermometer(); var settingsWindow = new SettingsWindow(); +var firstTimesettingsLoaded = true; + $(function() { console.log("ready"); @@ -80,6 +82,9 @@ function settingsLoaded() { console.log("settingsLoaded"); console.log("autoWarmUp: ",settings["printer.autoWarmUp"]); if(settings["printer.autoWarmUp"]) { - printer.preheat(); + if(firstTimesettingsLoaded) { + printer.preheat(); + firstTimesettingsLoaded = false; + } } } \ No newline at end of file