From 6c9404ac0c3925ccaa03f1a2046fe00499758495 Mon Sep 17 00:00:00 2001 From: Jon Sanders Date: Thu, 18 Mar 2021 23:38:07 -0400 Subject: [PATCH] htu21d: sensor definition fix (#4075) HTU21D sensor class lacked the method `get_report_time_delta` invoked during watermark control loops. This short fix simply adds that method in, calling the `self.report_time` attribute created during class construction. Signed-off-by: Jon Sanders --- klippy/extras/htu21d.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/klippy/extras/htu21d.py b/klippy/extras/htu21d.py index 571642de..68299418 100644 --- a/klippy/extras/htu21d.py +++ b/klippy/extras/htu21d.py @@ -109,6 +109,9 @@ class HTU21D: def setup_callback(self, cb): self._callback = cb + def get_report_time_delta(self): + return self.report_time + def _init_htu21d(self): # Device Soft Reset self.i2c.i2c_write([HTU21D_COMMANDS['RESET']])