Skip to content

Commit

Permalink
Merge branch 'pr/3553' into maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed May 6, 2020
2 parents 4ba94c3 + 3bc4ae1 commit ed1b02d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/octoprint/plugins/virtual_printer/virtual.py
Expand Up @@ -1422,9 +1422,13 @@ def _simulateTemps(self, delta=0.5):
self.lastTempAt = monotonic_time()

def simulate(actual, target, ambient):
if target > 0 and abs(actual - target) > delta:
if target > 0:
goal = target
factor = 10
remaining = abs(actual - target)
if remaining > delta:
factor = 10
elif remaining < delta:
factor = remaining
elif not target and abs(actual - ambient) > delta:
goal = ambient
factor = 2
Expand Down

0 comments on commit ed1b02d

Please sign in to comment.