fix(split): now able to send a single keydown, but nothing else, from secondary parts of split boards

This commit is contained in:
Josh Klar 2021-04-10 18:17:05 -07:00
parent 33408dc228
commit 66788c29ca
No known key found for this signature in database
GPG Key ID: A4A0C7B4E8EEE222

View File

@ -139,16 +139,16 @@ class Split(Module):
def after_matrix_scan(self, keyboard):
if keyboard.matrix_update:
if self.split_type == SplitType.BLE:
if self.split_type == SplitType.UART and self._is_target:
pass # explicit pass just for dev sanity...
elif self.split_type == SplitType.UART and (self.data_pin2 or not self._is_target):
self._send_uart(keyboard.matrix_update)
elif self.split_type == SplitType.BLE:
self._send_ble(keyboard.matrix_update)
elif self.split_type == SplitType.UART and self.data_pin2:
self._send_uart(keyboard.matrix_update)
elif self.split_type == SplitType.UART and not self._is_target:
self._send_uart(keyboard.matrix_update)
elif self.split_type == SplitType.ONEWIRE:
pass # Protocol needs written
else:
print('wat')
print('Unexpected case in after_matrix_scan')
return
@ -277,9 +277,9 @@ class Split(Module):
update[1] -= self.split_offset
else:
if self.split_target_left:
update[1] -= self.split_offset
else:
update[1] += self.split_offset
else:
update[1] -= self.split_offset
if self._uart is not None:
self._uart.write(update)