safe_z_home: Simplify check for axes to home

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-04-22 11:55:25 -04:00
parent 8ac81fed67
commit 120331f49a
1 changed files with 3 additions and 5 deletions

View File

@ -52,11 +52,9 @@ class SafeZHoming:
toolhead.get_kinematics().note_z_not_homed()
# Determine which axes we need to home
if not any([axis in params.keys() for axis in ['X', 'Y', 'Z']]):
need_x, need_y, need_z = [True] * 3
else:
need_x, need_y, need_z = tuple(axis in params
for axis in ['X', 'Y', 'Z'])
need_x, need_y, need_z = [axis in params for axis in "XYZ"]
if not need_x and not need_y and not need_z:
need_x = need_y = need_z = True
# Home XY axes if necessary
new_params = {}