mirror of https://github.com/Desuuuu/klipper.git
ds18b20: fix string conversion error on startup (#5559)
Signed-off-by: Lorenzo Pfeifer <Lorenzo.Pfeifer+github@googlemail.com>
This commit is contained in:
parent
d61d3ade23
commit
33ecc6d62e
|
@ -32,8 +32,9 @@ class DS18B20:
|
||||||
|
|
||||||
def _build_config(self):
|
def _build_config(self):
|
||||||
sid = "".join(["%02x" % (x,) for x in self.sensor_id])
|
sid = "".join(["%02x" % (x,) for x in self.sensor_id])
|
||||||
self._mcu.add_config_cmd("config_ds18b20 oid=%d serial=%s"
|
self._mcu.add_config_cmd(
|
||||||
% (self.oid, sid, DS18_MAX_CONSECUTIVE_ERRORS))
|
"config_ds18b20 oid=%d serial=%s max_error_count=%d"
|
||||||
|
% (self.oid, sid, DS18_MAX_CONSECUTIVE_ERRORS))
|
||||||
|
|
||||||
clock = self._mcu.get_query_slot(self.oid)
|
clock = self._mcu.get_query_slot(self.oid)
|
||||||
self._report_clock = self._mcu.seconds_to_clock(self.report_time)
|
self._report_clock = self._mcu.seconds_to_clock(self.report_time)
|
||||||
|
|
Loading…
Reference in New Issue