Skip to content

Commit

Permalink
Update version number to 0.2.3, comment out console.log lines, add op…
Browse files Browse the repository at this point in the history
…tional timeout parameter to timelapse.py
  • Loading branch information
FormerLurker committed Mar 29, 2018
1 parent d28fe47 commit 62a462a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions octoprint_octolapse/static/js/octolapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

};
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion octoprint_octolapse/static/js/octolapse.status.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down
8 changes: 5 additions & 3 deletions octoprint_octolapse/timelapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 62a462a

Please sign in to comment.