From 04179f3eae18bb89aee7b999c810a6d6d1c2614c Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 24 Jan 2021 15:19:43 -0500 Subject: [PATCH] bme280: Disable bme280 when using debug output Signed-off-by: Kevin O'Connor --- klippy/extras/bme280.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klippy/extras/bme280.py b/klippy/extras/bme280.py index 491f892f..bf6c7b91 100644 --- a/klippy/extras/bme280.py +++ b/klippy/extras/bme280.py @@ -38,6 +38,8 @@ class BME280: self.dig = None self.sample_timer = self.reactor.register_timer(self._sample_bme280) self.printer.add_object("bme280 " + self.name, self) + if self.printer.get_start_args().get('debugoutput') is not None: + return self.printer.register_event_handler("klippy:connect", self.handle_connect)