Skip to content

Commit

Permalink
1.4.0. Run "bkcmd=3" on device startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
yozik04 committed Apr 9, 2020
1 parent 1977a4e commit d10b536
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions nextion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def __init__(
self._sleeping = True
self.sets_todo = {}

async def on_startup(self):
await self.command("bkcmd=3") # Let's ensure we receive expected responses

async def on_wakeup(self):
await asyncio.sleep(
TIME_TO_RECOVER_FROM_SLEEP
Expand Down Expand Up @@ -77,6 +80,7 @@ def event_message_handler(self, message):
self._loop.create_task(self.on_wakeup())
self.event_handler(EventType(typ), None)
elif typ == EventType.STARTUP: # System successful start up
self._loop.create_task(self.on_startup())
self.event_handler(EventType(typ), None)
elif typ == EventType.SD_CARD_UPGRADE: # Start SD card upgrade
self.event_handler(EventType(typ), None)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def read(filename, parent=None):

setup(
name="nextion",
version="1.3.1",
version="1.4.0",
packages=find_packages(exclude=["tests", "tests.*"]),
python_requires=">=3.5.1, <4",
license="LGPL 3",
Expand Down

0 comments on commit d10b536

Please sign in to comment.