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
531217a0
Commit
531217a0
authored
Aug 27, 2016
by
Damien George
Browse files
extmod/modframebuf: Fix pixel accessor to return a 1-bit result.
parent
fea7fe45
Changes
1
Hide whitespace changes
Inline
Side-by-side
extmod/modframebuf.c
View file @
531217a0
...
...
@@ -83,7 +83,7 @@ STATIC mp_obj_t framebuf1_pixel(size_t n_args, const mp_obj_t *args) {
int
index
=
(
y
/
8
)
*
self
->
stride
+
x
;
if
(
n_args
==
3
)
{
// get
return
MP_OBJ_NEW_SMALL_INT
(
self
->
buf
[
index
]
>>
(
y
&
7
));
return
MP_OBJ_NEW_SMALL_INT
(
(
self
->
buf
[
index
]
>>
(
y
&
7
))
&
1
)
;
}
else
{
// set
if
(
mp_obj_get_int
(
args
[
3
]))
{
...
...
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