From 62a462a8a63a3c1e5b52bb836589c3d7f74c88b9 Mon Sep 17 00:00:00 2001 From: Brad Hochgesang Date: Thu, 29 Mar 2018 13:12:20 -0500 Subject: [PATCH] Update version number to 0.2.3, comment out console.log lines, add optional timeout parameter to timelapse.py --- octoprint_octolapse/static/js/octolapse.js | 6 +++--- octoprint_octolapse/static/js/octolapse.status.js | 2 +- octoprint_octolapse/timelapse.py | 8 +++++--- setup.py | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/octoprint_octolapse/static/js/octolapse.js b/octoprint_octolapse/static/js/octolapse.js index 2d89c37d..83a5c104 100644 --- a/octoprint_octolapse/static/js/octolapse.js +++ b/octoprint_octolapse/static/js/octolapse.js @@ -438,12 +438,12 @@ $(function () { self.is_admin(self.loginState.isAdmin()); }; self.onStartupComplete = function () { - console.log("Startup Complete") + //console.log("Startup Complete") self.getInitialState(); }; self.onDataUpdaterReconnect = function () { - console.log("Reconnected Client") + //console.log("Reconnected Client") self.getInitialState(); }; @@ -489,7 +489,7 @@ $(function () { }; self.updateState = function (state) { - console.log(state); + //console.log(state); if (state.Position != null) { //console.log('octolapse.js - state-changed - Position'); Octolapse.Status.updatePosition(state.Position); diff --git a/octoprint_octolapse/static/js/octolapse.status.js b/octoprint_octolapse/static/js/octolapse.status.js index eee29052..2eb765f4 100644 --- a/octoprint_octolapse/static/js/octolapse.status.js +++ b/octoprint_octolapse/static/js/octolapse.status.js @@ -101,7 +101,7 @@ $(function () { self.SETTINGS_VISIBLE_KEY = "settings_visible"; self.onBeforeBinding = function () { var settingsVisible = Octolapse.getLocalStorage(self.SETTINGS_VISIBLE_KEY); - // console.log("Local Storage for " + self.SETTINGS_VISIBLE_KEY + ": " + settingsVisible); + //console.log("Local Storage for " + self.SETTINGS_VISIBLE_KEY + ": " + settingsVisible); if(settingsVisible == null || settingsVisible.toLowerCase() === "true") { diff --git a/octoprint_octolapse/timelapse.py b/octoprint_octolapse/timelapse.py index e9199c1d..d9ead47b 100644 --- a/octoprint_octolapse/timelapse.py +++ b/octoprint_octolapse/timelapse.py @@ -148,7 +148,10 @@ def on_position_received(self, payload): self._position_payload = payload self._position_signal.set() - def get_position_async(self, start_gcode=None): + def get_position_async(self, start_gcode=None, timeout=None): + if timeout is None: + timeout = self._position_timeout + self.Settings.current_debug_profile().log_print_state_change("Octolapse is requesting a position.") # Warning, we can only request one position at a time! @@ -166,7 +169,7 @@ def get_position_async(self, start_gcode=None): commands_to_send = start_gcode + commands_to_send self.OctoprintPrinter.commands(commands_to_send) - event_is_set = self._position_signal.wait(self._position_timeout) + event_is_set = self._position_signal.wait(timeout) if not event_is_set: # we ran into a timeout while waiting for a fresh position @@ -264,7 +267,6 @@ def _take_timelapse_snapshot(self, trigger, triggering_command): # park the printhead in the snapshot position and wait for the movement to complete snapshot_position = self.get_position_async( start_gcode=snapshot_gcode.StartGcode + snapshot_gcode.SnapshotCommands - ) timelapse_snapshot_payload["snapshot_position"] = snapshot_position # record the snapshot start time diff --git a/setup.py b/setup.py index 60a42b3b..ce7770ff 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ # plugin module plugin_name = "Octolapse" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "0.2.2" +plugin_version = "0.2.3" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module plugin_description = """Create stabilized timelapses of your 3d prints. Highly customizable, loads of presets, lots of fun."""