rpi_temperature: Disable rpi_temperature when using debug output

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-01-24 13:59:09 -05:00
parent 29831a2f69
commit cf8d5a6606
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,8 @@ class RPiTemperature:
self.temp = self.min_temp = self.max_temp = 0.0 self.temp = self.min_temp = self.max_temp = 0.0
self.printer.add_object("rpi_temperature " + self.name, self) self.printer.add_object("rpi_temperature " + self.name, self)
if self.printer.get_start_args().get('debugoutput') is not None:
return
self.sample_timer = self.reactor.register_timer( self.sample_timer = self.reactor.register_timer(
self._sample_pi_temperature) self._sample_pi_temperature)
try: try: