From f0559fe1fe71991d4881d2894ec8e77de59f6bf9 Mon Sep 17 00:00:00 2001 From: vietho Date: Tue, 13 Dec 2022 22:59:25 +0700 Subject: [PATCH] Fix operand type error & filament stop detection on sidebar --- octoprint_smart_filament_sensor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint_smart_filament_sensor/__init__.py b/octoprint_smart_filament_sensor/__init__.py index c99632a..139b3e7 100644 --- a/octoprint_smart_filament_sensor/__init__.py +++ b/octoprint_smart_filament_sensor/__init__.py @@ -24,7 +24,7 @@ def initialize(self): GPIO.setwarnings(False) # Disable GPIO warnings self.print_started = False - self.last_movement_time = None + self.last_movement_time = datetime.now() self.lastE = -1 self.currentE = -1 self.START_DISTANCE_OFFSET = 7