Skip to content

Commit

Permalink
Fix issue where _simulateTemps may never reach target temp but instea…
Browse files Browse the repository at this point in the history
…d be stuck within 0.5C(delta)
  • Loading branch information
kantlivelong committed May 5, 2020
1 parent 5596daf commit 538dc9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/octoprint/plugins/virtual_printer/virtual.py
Expand Up @@ -1425,6 +1425,9 @@ def simulate(actual, target, ambient):
if target > 0 and abs(actual - target) > delta:
goal = target
factor = 10
elif target > 0 and abs(actual - target) < delta:
goal = target
factor = abs(actual - target)
elif not target and abs(actual - ambient) > delta:
goal = ambient
factor = 2
Expand Down

0 comments on commit 538dc9a

Please sign in to comment.