Add fixme comments

This commit is contained in:
Odd Stråbø 2023-12-09 19:17:27 +01:00
parent 5599cb6f43
commit 4bb77c3bb3

View file

@ -212,7 +212,7 @@ class ChargeController:
def serial(self) -> str: def serial(self) -> str:
data = readMemory(self.device, 0x18, 3) data = readMemory(self.device, 0x18, 3)
if data is None: if data is None:
raise IOError raise IOError # FIXME: Raise specific error in readMemory
p1 = data[0] p1 = data[0]
p2 = data[1] p2 = data[1]
@ -223,7 +223,7 @@ class ChargeController:
def model(self) -> str: def model(self) -> str:
data = readMemory(self.device, 0x0C, 8) data = readMemory(self.device, 0x0C, 8)
if data is None: if data is None:
raise IOError raise IOError # FIXME: Raise specific error in readMemory
return data.decode("utf-8").strip() return data.decode("utf-8").strip()
@ -231,7 +231,7 @@ class ChargeController:
def version(self) -> str: def version(self) -> str:
data = readMemory(self.device, 0x14, 4) data = readMemory(self.device, 0x14, 4)
if data is None: if data is None:
raise IOError raise IOError # FIXME: Raise specific error in readMemory
major = (data[0] << 8) + data[1] major = (data[0] << 8) + data[1]
minor = data[2] minor = data[2]
@ -243,7 +243,7 @@ class ChargeController:
def load_enabled(self) -> bool: def load_enabled(self) -> bool:
data = readMemory(self.device, 0x010A, 1) data = readMemory(self.device, 0x010A, 1)
if data is None: if data is None:
raise IOError raise IOError # FIXME: Raise specific error in readMemory
return struct.unpack("x?", data)[0] return struct.unpack("x?", data)[0]