transform into static method
This commit is contained in:
parent
f30913b24b
commit
51bbeaa693
@ -104,7 +104,15 @@ class DevicesInfoParser:
|
||||
current_idx += 1
|
||||
return current_idx
|
||||
|
||||
def map_idx_to_type(self, devtype: int) -> str:
|
||||
def print(self, pw: PrintWrapper):
|
||||
pw.dlog(f"Device Type | Device State (0:None | 1:OK | 3:ERROR | 4:NOT FOUND)")
|
||||
for i in range(len(self.dev_types)):
|
||||
pw.dlog(
|
||||
f"{self.map_idx_to_type(self.dev_types[i])} | {self.dev_statuses[i]}"
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def map_idx_to_type(devtype: int) -> str:
|
||||
if devtype == 0:
|
||||
return "Reserved"
|
||||
if devtype == 1:
|
||||
@ -123,13 +131,6 @@ class DevicesInfoParser:
|
||||
return "FRAM"
|
||||
return "Unknown Type"
|
||||
|
||||
def print(self, pw: PrintWrapper):
|
||||
pw.dlog(f"Device Type | Device State (0:None | 1:OK | 3:ERROR | 4:NOT FOUND)")
|
||||
for i in range(len(self.dev_types)):
|
||||
pw.dlog(
|
||||
f"{self.map_idx_to_type(self.dev_types[i])} | {self.dev_statuses[i]}"
|
||||
)
|
||||
|
||||
|
||||
def handle_pdu_data(
|
||||
printer: FsfwTmTcPrinter, pdu_idx: int, set_id: int, hk_data: bytes
|
||||
|
Loading…
x
Reference in New Issue
Block a user