diff options
author | Timofey Titovets <nefelim4ag@gmail.com> | 2024-12-23 22:50:24 +0100 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2025-04-05 21:27:37 -0400 |
commit | 3beb465247d06bed789025b9857105f3f2496e5e (patch) | |
tree | ac4b26b25462657dbfad07562d633071d99a806f /klippy/extras | |
parent | 2ec69ae361ffe78a7b60cd44aec8a41d88fa3be4 (diff) | |
download | kutter-3beb465247d06bed789025b9857105f3f2496e5e.tar.gz kutter-3beb465247d06bed789025b9857105f3f2496e5e.tar.xz kutter-3beb465247d06bed789025b9857105f3f2496e5e.zip |
temperature_combined: delay initialization
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Diffstat (limited to 'klippy/extras')
-rw-r--r-- | klippy/extras/temperature_combined.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/extras/temperature_combined.py b/klippy/extras/temperature_combined.py index 95416619..f5aafd1e 100644 --- a/klippy/extras/temperature_combined.py +++ b/klippy/extras/temperature_combined.py @@ -52,8 +52,10 @@ class PrinterSensorCombined: def _handle_ready(self): # Start temperature update timer + # There is a race condition with sensors where they can be not ready, + # and return 0 or None - initialize a little bit later. self.reactor.update_timer(self.temperature_update_timer, - self.reactor.NOW) + self.reactor.monotonic() + 1.) def setup_minmax(self, min_temp, max_temp): self.min_temp = min_temp |