Skip to content

Commit

Permalink
remove obsolete commands
Browse files Browse the repository at this point in the history
  • Loading branch information
elenzil committed Jul 24, 2018
1 parent 1debcb8 commit 6bea8aa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
28 changes: 0 additions & 28 deletions WonderPy/components/wwCommandAccessory.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,6 @@ def do_sketchkit_pen_up(self):
self._robot.cmds.head.do_pan_voltage(self.SKETCH_PEN_UP_VOLTAGE_PAN)
time.sleep(0.2)

def stage_blaster_fire(self, num_shots=1):
message = 8 + num_shots
self.stage_LED_message([_rc.WW_COMMAND_LIGHT_RGB_LEFT_EAR, ], message)

def stage_blaster_test_connection(self):
message = 4
self.stage_LED_message([_rc.WW_COMMAND_LIGHT_RGB_LEFT_EAR, ], message)

def stage_LED_message(self, LEDs, message):
"""
:param LEDs: a list of WW_COMMAND_LIGHT_RGB_LEFT_EAR etc.
:param message: a one-byte message
:return: nothing
"""
self._robot.stage_cmds(self.compose_LED_message(LEDs, message))

# noinspection PyDictCreation
def compose_LED_message(self, LEDs, message):
"""
:param LEDs: a list of WW_COMMAND_LIGHT_RGB_LEFT_EAR etc.
:param message: a one-byte message
:return: json command
"""
args = {}
args[_rcv.WW_COMMAND_VALUE_LEDS ] = LEDs
args[_rcv.WW_COMMAND_VALUE_MESSAGE] = message
return {_rc.WW_COMMAND_LED_MESSAGE : args}

@do_not_call_within_connect_or_sensors
def do_xylo_hit(self):
self.stage_xylo_hit()
Expand Down
3 changes: 0 additions & 3 deletions test/test_CommandAccessory.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ def test_launcher(self):
self.assertAlmostEquals(m.call_args_list[1][0][0]['401']['dir' ], 0 )
self.assertAlmostEquals(m.call_args_list[2][0][0]['401']['dir' ], 1 )

def test_blaster(self):
print("todo: implement blaster test-cases")


if __name__ == '__main__':
unittest.main()

0 comments on commit 6bea8aa

Please sign in to comment.