Skip to content

Commit

Permalink
skip coils without hardware drivers when generating coil info for ser…
Browse files Browse the repository at this point in the history
…vice menu
  • Loading branch information
bosh committed Feb 11, 2025
1 parent d1552a5 commit 51c227f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpf/core/service_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def get_coil_map(self, do_sort=True) -> List[CoilMap]:
"""Return a map of all coils in the machine."""
coil_map = []
for coil in self.machine.coils.values():
assert coil.hw_driver is not None
coil_map.append(CoilMap(coil.hw_driver.get_board_name(), coil))
if hasattr(coil, "hw_driver"):
coil_map.append(CoilMap(coil.hw_driver.get_board_name(), coil))

# sort by board + driver number
if do_sort:
Expand Down

0 comments on commit 51c227f

Please sign in to comment.