File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,18 +110,19 @@ def run_test():
110110
111111 pyb .exec ('def apply(l, f):\r \n for item in l:\r \n f(item)\r \n ' )
112112
113- pyb .exec ('leds=[pyb.Led (l) for l in range(1, 5)]' )
113+ pyb .exec ('leds=[pyb.LED (l) for l in range(1, 5)]' )
114114 pyb .exec ('apply(leds, lambda l:l.off())' )
115115
116116 ## USR switch test
117117
118- if True :
119- for i in range (2 ):
120- print ("press USR button" )
121- pyb .exec ('while pyb.switch(): pyb.delay(10)' )
122- pyb .exec ('while not pyb.switch(): pyb.delay(10)' )
118+ pyb .exec ('switch = pyb.Switch()' )
119+
120+ for i in range (2 ):
121+ print ("press USR button" )
122+ pyb .exec ('while switch(): pyb.delay(10)' )
123+ pyb .exec ('while not switch(): pyb.delay(10)' )
123124
124- print ('USR switch passed' )
125+ print ('USR switch passed' )
125126
126127 ## accel test
127128
You can’t perform that action at this time.
0 commit comments