implement support for multiple scanners at once

fixup
This commit is contained in:
xs5871
2022-04-16 20:04:42 +00:00
committed by Kyle Brown
parent c7490087b6
commit 7ff77b97bb
5 changed files with 31 additions and 17 deletions

View File

@@ -22,7 +22,12 @@ class Scanner:
Base class for scanners.
'''
coord_mapping = None
# for split keyboards, the offset value will be assigned in Split module
offset = 0
@property
def coord_mapping(self):
return tuple(range(self.offset, self.offset + self.key_count))
@property
def key_count(self):
@@ -34,4 +39,4 @@ class Scanner:
The key report is a byte array with contents [row, col, True if pressed else False]
'''
pass
raise NotImplementedError