mathoudebine / mathoudebine/turing-smart-screen-python
Problem and solution for turzx 3.5 screen not turning off
Nobody has claimed this yet.
- Dominant language
- Rich Text Format
- Stars
- 2.3k
- Forks
- 412
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 7
Description
My turzx 3.5 screen would not turn off when exiting the app or going into sleep.
I've looked into it and it turns out the 'ScreenOff(self)' function in library\lcd\lcd_comm_rev_a.py is the culprit.
I managed to fix this problem with these following changes,
I don't know why my screen behaves like this, maybe someone more involved with this projet can shed some light
def ScreenOff(self):
self.SendCommand(Command.SET_BRIGHTNESS, 255, 0, 0, 0)
time.sleep(0.1)
self.SendCommand(Command.SCREEN_OFF, 0, 0, 0, 0)
time.sleep(0.1)
self.SendCommand(Command.TO_BLACK, 0, 0, 0, 0)
time.sleep(0.1)
self.SendCommand(212, 0, 0, 0, 0)
Environment:
- Smart screen model [Turing 3.5"]
- Revision of this project [3.9.6 release]
- OS with version [ Windows 10 & Windows 11]
- Python version [Python 3.9]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in library/lcd/lcd_comm_rev_a.py at ScreenOff(self) and compare its current command sequence with the sequence reported in the issue. Verify the screen turns off when exiting the app or entering sleep on the listed Turing 3.5-inch setup under Windows 10/11; done means both transitions turn the display off.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100