microfix and bat file added

This commit is contained in:
Ayzen
2026-04-22 13:00:32 +03:00
parent 43d490e2f8
commit c92745d2bc
2 changed files with 69 additions and 0 deletions

View File

@ -215,9 +215,13 @@ class Protocol:
# ---- Raw I/O
def send_raw(self, data: bytes) -> None:
if self._serial is None or not self._serial.is_open:
raise CommunicationError("Serial port is not connected")
self._serial.write(data)
def receive_raw(self, length: int) -> bytes:
if self._serial is None or not self._serial.is_open:
raise CommunicationError("Serial port is not connected")
return self._serial.read(length)
# ---- Static encoding helpers (no connection required) ---------------