File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -110,18 +110,19 @@ def run_test():
110
110
111
111
pyb .exec ('def apply(l, f):\r \n for item in l:\r \n f(item)\r \n ' )
112
112
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)]' )
114
114
pyb .exec ('apply(leds, lambda l:l.off())' )
115
115
116
116
## USR switch test
117
117
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)' )
123
124
124
- print ('USR switch passed' )
125
+ print ('USR switch passed' )
125
126
126
127
## accel test
127
128
You can’t perform that action at this time.
0 commit comments