Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
94aeba04
Commit
94aeba04
authored
Oct 26, 2016
by
Alex March
Committed by
Damien George
Nov 03, 2016
Browse files
tests/extmod/framebuf1: Test framebuffer pixel clear, and text function.
parent
f9b6b37c
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/extmod/framebuf1.py
View file @
94aeba04
...
...
@@ -23,6 +23,10 @@ fbuf.pixel(0, 15, 1)
fbuf
.
pixel
(
4
,
15
,
1
)
print
(
buf
)
# clear pixel
fbuf
.
pixel
(
4
,
15
,
0
)
print
(
buf
)
# get pixel
print
(
fbuf
.
pixel
(
0
,
0
),
fbuf
.
pixel
(
1
,
1
))
...
...
@@ -39,3 +43,14 @@ fbuf.scroll(-1, 0)
print
(
buf
)
fbuf
.
scroll
(
2
,
2
)
print
(
buf
)
# print text
fbuf
.
fill
(
0
)
fbuf
.
text
(
"hello"
,
0
,
0
,
1
)
print
(
buf
)
fbuf
.
text
(
"hello"
,
0
,
0
,
0
)
# clear
print
(
buf
)
# char out of font range set to chr(127)
fbuf
.
text
(
str
(
chr
(
31
)),
0
,
0
)
print
(
buf
)
tests/extmod/framebuf1.py.exp
View file @
94aeba04
bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff')
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
bytearray(b'\x01\x00\x00\x00\x01\x80\x00\x00\x00\x80')
bytearray(b'\x01\x00\x00\x00\x01\x80\x00\x00\x00\x00')
1 0
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00')
bytearray(b'\x00\x00@\x00\x00\x00\x00\x00\x00\x00')
bytearray(b'\x00\x00\x00@\x00\x00\x00\x00\x00\x00')
bytearray(b'\x00\x00@\x00\x00\x00\x00\x00\x00\x00')
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01')
bytearray(b'\x00\x7f\x7f\x04\x04\x00\x00\x00\x00\x00')
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
bytearray(b'\xaaU\xaaU\xaa\x00\x00\x00\x00\x00')
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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