diff --git a/display.py b/display.py index 772f893..dbc70a5 100644 --- a/display.py +++ b/display.py @@ -11,9 +11,9 @@ class display: async def redraw(self, row = None): if row == None: for row, line in enumerate(self.contents): - await self.device.async_message(line, row + 1) + await self.device.async_message(line, row) else: - await self.device.async_message(self.contents[row], row + 1) + await self.device.async_message(self.contents[row], row) async def read(self, row): return self.contents[row] diff --git a/fancontrol.py b/fancontrol.py index e914803..a040eb6 100644 --- a/fancontrol.py +++ b/fancontrol.py @@ -11,7 +11,8 @@ def wheel_handler(dir): def button_test(*args): print(args) - disp.write(2, args) + loop = asyncio.get_event_loop() + loop.create_task(disp.write(1, args)) async def main(): pi = asyncpio.pi()