diff --git a/display.py b/display.py index cc56df1..34e3ed5 100644 --- a/display.py +++ b/display.py @@ -8,16 +8,16 @@ class display: self.device = LCD(2, i2c_addr, True) self.contents = [""] * self.height - async def redraw(self, row = None): + def redraw(self, row = None): if row == None: for row, line in enumerate(self.contents): - await self.device.async_message(row + 1, line) + asyncio.run(self.device.async_message(row + 1, line)) else: - await self.device.async_message(row + 1, line) + asyncio.run(self.device.async_message(row + 1, line)) - async def read(self, row): + def read(self, row): return self.contents[row] - async def write(self, row, data, offset = 0): + def write(self, row, data, offset = 0): self.contents[row] = f'{self.contents[row][:offset]}{data}{self.contents[row][offset+len(data):]}' self.redraw(row) \ No newline at end of file