Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
94aeba04
Commit
94aeba04
authored
Oct 26, 2016
by
Alex March
Committed by
Damien George
Nov 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests/extmod/framebuf1: Test framebuffer pixel clear, and text function.
parent
f9b6b37c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
tests/extmod/framebuf1.py
tests/extmod/framebuf1.py
+15
-0
tests/extmod/framebuf1.py.exp
tests/extmod/framebuf1.py.exp
+4
-0
No files found.
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
Markdown
is supported
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