bme280: Disable bme280 when using debug output

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-01-24 15:19:43 -05:00
parent c3e3b2280a
commit 04179f3eae
1 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,8 @@ class BME280:
self.dig = None self.dig = None
self.sample_timer = self.reactor.register_timer(self._sample_bme280) self.sample_timer = self.reactor.register_timer(self._sample_bme280)
self.printer.add_object("bme280 " + self.name, self) 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.printer.register_event_handler("klippy:connect",
self.handle_connect) self.handle_connect)