From 069aaa24c2f31a5114376d06d1068a6ee54ef4e4 Mon Sep 17 00:00:00 2001 From: Lonja Selter Date: Fri, 29 Mar 2019 13:19:27 +0000 Subject: [PATCH] fix logic error in temperature cut off --- octoprint_enclosure/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/octoprint_enclosure/__init__.py b/octoprint_enclosure/__init__.py index 446852f..9c1fc94 100644 --- a/octoprint_enclosure/__init__.py +++ b/octoprint_enclosure/__init__.py @@ -695,7 +695,8 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin, octoprint.plugin.TemplateP try: calculated_duty = ((current_temp - temp_a) * (duty_b - duty_a) / (temp_b - temp_a)) + duty_a - if calculated_duty < temp_a: + + if current_temp < temp_a: calculated_duty = 0 except: calculated_duty = 0