stuff
This commit is contained in:
parent
8796110721
commit
cf1e1970a5
1 changed files with 3 additions and 3 deletions
|
|
@ -11,13 +11,13 @@ 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)
|
||||
await self.device.async_message(line, row + 1)
|
||||
else:
|
||||
await self.device.async_message(self.contents[row], row)
|
||||
await self.device.async_message(self.contents[row - 1], row)
|
||||
|
||||
async def read(self, row):
|
||||
return self.contents[row]
|
||||
|
||||
async def write(self, row, data, offset = 0):
|
||||
self.contents[row] = f'{self.contents[row][:offset]}{data}{self.contents[row][offset+len(data):]}'
|
||||
self.contents[row - 1] = f'{self.contents[row][:offset]}{data}{self.contents[row][offset+len(data):]}'
|
||||
await self.redraw(row)
|
||||
Loading…
Add table
Add a link
Reference in a new issue