Stop scan planner plots erroring if there are no secondary locations
This commit is contained in:
parent
90be139575
commit
dfe7fb6c42
2 changed files with 5 additions and 2 deletions
|
|
@ -504,7 +504,7 @@ class SmartSpiral(ScanPlanner):
|
|||
"""Sort the remaining positions based on the current location."""
|
||||
|
||||
# Defined rather than use a lambda for readability
|
||||
def sort_key(pos: FutureScanLocation) -> tuple[float, float, float]:
|
||||
def sort_key(pos: FutureScanLocation) -> tuple[bool, float, float, float]:
|
||||
return (
|
||||
self._is_primary_location(pos), # False sorts low
|
||||
self.moves_between(current_pos, pos),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue