Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
circuitpython
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
circuitpython
Commits
b0a6dda1
Commit
b0a6dda1
authored
Feb 21, 2017
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drivers/display/lcd160cr: Fix bugs with lcd.get_pixel().
Fixes issues #2880 and #2881.
parent
8c5988bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
drivers/display/lcd160cr.py
drivers/display/lcd160cr.py
+2
-2
No files found.
drivers/display/lcd160cr.py
View file @
b0a6dda1
...
...
@@ -243,13 +243,13 @@ class LCD160CR:
self
.
_fcmd2b
(
'<BBBBH'
,
0x41
,
x
,
y
,
c
)
def
get_pixel
(
self
,
x
,
y
):
self
.
_fcmd2
b
(
'<BBBB'
,
0x61
,
x
,
y
)
self
.
_fcmd2
(
'<BBBB'
,
0x61
,
x
,
y
)
t
=
1000
while
t
:
self
.
i2c
.
readfrom_into
(
self
.
i2c_addr
,
self
.
buf1
)
if
self
.
buf1
[
0
]
>=
2
:
self
.
i2c
.
readfrom_into
(
self
.
i2c_addr
,
self
.
buf
[
3
])
return
self
.
buf
[
3
][
1
]
+
self
.
buf
[
3
][
2
]
<<
8
return
self
.
buf
[
3
][
1
]
|
self
.
buf
[
3
][
2
]
<<
8
t
-=
1
sleep_ms
(
1
)
raise
OSError
(
uerrno
.
ETIMEDOUT
)
...
...
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