fix possible issue with the mesh profile is not complete
This commit is contained in:
parent
f9af11d635
commit
d6b700381b
@ -74,14 +74,17 @@ class Printer:
|
||||
if x.startswith('output_pin ') and not x.split()[1].startswith("_"):
|
||||
self.output_pin_count += 1
|
||||
if x.startswith('bed_mesh '):
|
||||
r = self.config[x]
|
||||
r['x_count'] = int(r['x_count'])
|
||||
r['y_count'] = int(r['y_count'])
|
||||
r['max_x'] = float(r['max_x'])
|
||||
r['min_x'] = float(r['min_x'])
|
||||
r['max_y'] = float(r['max_y'])
|
||||
r['min_y'] = float(r['min_y'])
|
||||
r['points'] = [[float(j.strip()) for j in i.split(",")] for i in r['points'].strip().split("\n")]
|
||||
try:
|
||||
r = self.config[x]
|
||||
r['x_count'] = int(r['x_count'])
|
||||
r['y_count'] = int(r['y_count'])
|
||||
r['max_x'] = float(r['max_x'])
|
||||
r['min_x'] = float(r['min_x'])
|
||||
r['max_y'] = float(r['max_y'])
|
||||
r['min_y'] = float(r['min_y'])
|
||||
r['points'] = [[float(j.strip()) for j in i.split(",")] for i in r['points'].strip().split("\n")]
|
||||
except KeyError:
|
||||
logging.debug(f"Couldn't load mesh {x}: {self.config[x]}")
|
||||
self.process_update(data)
|
||||
|
||||
logging.info(f"Klipper version: {printer_info['software_version']}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user