37 from abs_hand_command
import AbsractHandCommand
42 Following Command design pattern, this class represents commands 43 for turning hand lights. 51 super(HandlightCommand, self).
__init__(hands, hand, dio_pins)
55 @see abs_hand_command.AbsractHandCommand._assign_dio_names 62 @see abs_hand_command.AbsractHandCommand.execute 64 @param operation: param type: 65 - 'True': Turn the light on. 66 - 'False': Turn the light off. 68 @return: True if digital out was writable to the register. 74 if self._hands.HAND_R == self._hand:
76 elif self._hands.HAND_L == self._hand:
81 if self._hands.HAND_R == self._hand:
83 elif self._hands.HAND_L == self._hand:
87 return self._hands._dio_writer(dout, mask)
91 @param hand: Both hands if None. 93 @param on: Despite its type, it's handled as str in this method. 95 @return: True if the lights turned. False otherwise. 98 if self._hands.HAND_L == hand:
102 elif self._hands.HAND_R == hand:
def turn_handlight(self, hand=None, on=True)
def _assign_dio_names(self, dio_pins)
def __init__(self, hands, hand, dio_pins)
def execute(self, operation)