Skip to content

Commit

Permalink
Controller will build simulating gpio object so no reason for the check.
Browse files Browse the repository at this point in the history
  • Loading branch information
amit lissack committed May 25, 2021
1 parent d177683 commit 000c2ff
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions api/src/opentrons/hardware_control/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,16 @@ def disengage_axes(self, axes: List[str]):
self._smoothie_driver.disengage_axis(''.join(axes))

def set_lights(self, button: Optional[bool], rails: Optional[bool]):
if opentrons.config.IS_ROBOT:
if button is not None:
self.gpio_chardev.set_button_light(blue=button)
if rails is not None:
self.gpio_chardev.set_rail_lights(rails)
if button is not None:
self.gpio_chardev.set_button_light(blue=button)
if rails is not None:
self.gpio_chardev.set_rail_lights(rails)

def get_lights(self) -> Dict[str, bool]:
if not opentrons.config.IS_ROBOT:
return {}
return {'button': self.gpio_chardev.get_button_light()[2],
'rails': self.gpio_chardev.get_rail_lights()}
return {
'button': self.gpio_chardev.get_button_light()[2],
'rails': self.gpio_chardev.get_rail_lights()
}

def pause(self):
self._smoothie_driver.pause()
Expand Down

0 comments on commit 000c2ff

Please sign in to comment.