Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
71a1e352
Commit
71a1e352
authored
May 02, 2014
by
Craig Barnes
Browse files
Fix pyboard.py tests.
parent
e276753b
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/pyboard.py
View file @
71a1e352
...
...
@@ -110,18 +110,19 @@ def run_test():
pyb
.
exec
(
'def apply(l, f):
\r\n
for item in l:
\r\n
f(item)
\r\n
'
)
pyb
.
exec
(
'leds=[pyb.L
ed
(l) for l in range(1, 5)]'
)
pyb
.
exec
(
'leds=[pyb.L
ED
(l) for l in range(1, 5)]'
)
pyb
.
exec
(
'apply(leds, lambda l:l.off())'
)
## USR switch test
if
True
:
for
i
in
range
(
2
):
print
(
"press USR button"
)
pyb
.
exec
(
'while pyb.switch(): pyb.delay(10)'
)
pyb
.
exec
(
'while not pyb.switch(): pyb.delay(10)'
)
pyb
.
exec
(
'switch = pyb.Switch()'
)
for
i
in
range
(
2
):
print
(
"press USR button"
)
pyb
.
exec
(
'while switch(): pyb.delay(10)'
)
pyb
.
exec
(
'while not switch(): pyb.delay(10)'
)
print
(
'USR switch passed'
)
print
(
'USR switch passed'
)
## accel test
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment