-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude Objects #4716
Exclude Objects #4716
Changes from 1 commit
89acce7
7165183
b99b45e
e132b2c
1fb44d6
1132a3f
ab2e146
4dc6609
90d0a6a
fdd8655
4c5e052
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Troy Jacobson <troy.d.jacobson@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,8 @@ def _setup_transform(self): | |
if not self.next_transform: | ||
tuning_tower = self.printer.lookup_object('tuning_tower', None) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need to specify the |
||
if self.gcode_move.move_transform == tuning_tower: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't peek into another object's members, so we either need to add a |
||
logging.info('The ExcludeObject move transform is not being loaded due to Tuning tower being Active') | ||
logging.info('The ExcludeObject move transform is not being ' | ||
'loaded due to Tuning tower being Active') | ||
return | ||
|
||
self.next_transform = self.gcode_move.set_move_transform(self, | ||
|
@@ -78,7 +79,8 @@ def _reset_file(self): | |
self.current_object = None | ||
if self.next_transform: | ||
if self.gcode_move.move_transform != self: | ||
logging.info("ExcludeObject move transform is not being unregistered because it is not at the head of the transform chain.") | ||
logging.info('ExcludeObject move transform is not being ' | ||
'unregistered because it is not at the head of the transform chain.') | ||
return | ||
|
||
self.gcode_move.set_move_transform(self.next_transform, force=True) | ||
|
@@ -239,7 +241,8 @@ def cmd_DEFINE_OBJECT(self, params): | |
logging.info('The definition for %s was not registered ' | ||
'since the Exclude Object move transform is not enabled. This ' | ||
'is most likely due to an active Tuning Tower command.', name) | ||
params.respond_info("The Exclude Object module is active while a Tuning Tower test is in progress.") | ||
params.respond_info("The Exclude Object module is active while a Tuning " | ||
"Tower test is in progress.") | ||
return | ||
|
||
center = params.get('CENTER', default=None) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's preferable to use
if self.next_transform is None
when checking an external object because the external object could override the truth check.