Skip to content

Commit

Permalink
Fix for #66 - Update Fan Speed immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
sco01 committed Oct 4, 2019
1 parent a69269f commit 8c38534
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions octoprint_dashboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def psUtilGetStats(self):

def on_after_startup(self):
self._logger.info("Dashboard started")

self.timer = RepeatedTimer(3.0, self.send_notifications, run_first=True)
self.timer.start()

Expand All @@ -54,9 +53,8 @@ def send_notifications(self):
layerLabels=str(self.layer_labels)))

def on_event(self, event, payload):
if event == "DisplayLayerProgress_layerChanged":
if event == "DisplayLayerProgress_layerChanged" or event == "DisplayLayerProgress_fanspeedChanged":
#self._logger.info("Current Layer: " + payload.get('currentLayer'))

if int(payload.get('lastLayerDurationInSeconds')) > 0:
self.layer_times.append(payload.get('lastLayerDurationInSeconds'))
self.layer_labels.append(int(payload.get('currentLayer')) - 1)
Expand Down

0 comments on commit 8c38534

Please sign in to comment.