Skip to content

Commit

Permalink
claim estop on power on only if isn't already acquired
Browse files Browse the repository at this point in the history
For spot_driver with estop, if power_off is called, and power_on is called, driver crashes as an error is thrown as it tries to reset estop.
Prevent this case.
  • Loading branch information
skpawar1305 authored Nov 28, 2023
1 parent ae0f808 commit d7a2b26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spot_wrapper/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,8 +1283,8 @@ def power_on(self) -> typing.Tuple[bool, str]:
"""
# Don't bother trying to power on if we are already powered on
if not self.check_is_powered_on():
# If we are requested to start the estop, we have to acquire it when powering on.
if self._start_estop:
# If we are requested to start the estop, we have to acquire it when powering on. Ignore if estop is already acquired.
if self._start_estop and self._estop_keepalive is None:
self.resetEStop()
try:
self._logger.info("Powering on")
Expand Down

0 comments on commit d7a2b26

Please sign in to comment.