File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ def motor_move(self, direction='forward'):
584584 raise TypeError
585585 Runner .wait (100 ) # Since broadcast from controller is per 100ms
586586
587- def motor_stop (self , which_motor : str ):
587+ def motor_stop (self , which_motor = 'both' ):
588588 if isinstance (which_motor , str ):
589589 if which_motor .lower () == 'right' :
590590 self .write (Neosoco .RIGHT_MOTOR , 0 )
@@ -594,10 +594,8 @@ def motor_stop(self, which_motor: str):
594594 self .write (Neosoco .LEFT_MOTOR , 0 )
595595 self .write (Neosoco .RIGHT_MOTOR , 0 )
596596 else :
597- Runner .shutdown () # The motor will not stop unless the shutdown() function is used
598597 raise ValueError ('Wrong value of motor' )
599598 else :
600- Runner .shutdown () # The motor will not stop unless the shutdown() function is used
601599 raise TypeError
602600 Runner .wait (100 ) # Since broadcast from controller is per 100ms
603601
You can’t perform that action at this time.
0 commit comments