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'):
584
584
raise TypeError
585
585
Runner .wait (100 ) # Since broadcast from controller is per 100ms
586
586
587
- def motor_stop (self , which_motor : str ):
587
+ def motor_stop (self , which_motor = 'both' ):
588
588
if isinstance (which_motor , str ):
589
589
if which_motor .lower () == 'right' :
590
590
self .write (Neosoco .RIGHT_MOTOR , 0 )
@@ -594,10 +594,8 @@ def motor_stop(self, which_motor: str):
594
594
self .write (Neosoco .LEFT_MOTOR , 0 )
595
595
self .write (Neosoco .RIGHT_MOTOR , 0 )
596
596
else :
597
- Runner .shutdown () # The motor will not stop unless the shutdown() function is used
598
597
raise ValueError ('Wrong value of motor' )
599
598
else :
600
- Runner .shutdown () # The motor will not stop unless the shutdown() function is used
601
599
raise TypeError
602
600
Runner .wait (100 ) # Since broadcast from controller is per 100ms
603
601
You can’t perform that action at this time.
0 commit comments