[update] print something debug info
This commit is contained in:
@@ -854,7 +854,8 @@ class I4V4Z4T4DataDecoder(RecDataDecoder):
|
||||
|
||||
__slots__ = ('_message', '_cycle_number', '_start_return_data', '_time_stamp',
|
||||
'_total_time_stamp', '_mode', '_cycle_start_time',
|
||||
'_mode_stop', '_show_data')
|
||||
'_mode_stop', '_show_data',
|
||||
'_last_mem_wrong_information', '_last_mem_cnt', '_last_elite_notify_times')
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@@ -871,6 +872,10 @@ class I4V4Z4T4DataDecoder(RecDataDecoder):
|
||||
|
||||
self._show_data = False
|
||||
|
||||
self._last_mem_wrong_information = -1
|
||||
self._last_mem_cnt = -1
|
||||
self._last_elite_notify_times = -1
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self.NAME
|
||||
@@ -935,6 +940,19 @@ class I4V4Z4T4DataDecoder(RecDataDecoder):
|
||||
# self._show_data = True
|
||||
|
||||
mem_wrong_information = struct.unpack('<i', data[43:47])[0] # mem_wrong_information = green retry, green wrong, red retry, red wrong
|
||||
|
||||
if mem_wrong_information != self._last_mem_wrong_information:
|
||||
print(datetime.now(), 'device', str(self.device), 'mem_wrong_information[43:47]:', data[43:47], mem_wrong_information, self._last_mem_wrong_information, flush = True)
|
||||
if mem_cnt != self._last_mem_cnt+1:
|
||||
if not (mem_cnt == 0 and self._last_mem_cnt == 255):
|
||||
print(datetime.now(), 'device', str(self.device), 'mem_cnt:', mem_cnt, 'self._last_mem_cnt:', self._last_mem_cnt, flush = True)
|
||||
if (elite_notify_times != self._last_elite_notify_times+1) and not (elite_notify_times == 0 and self._last_elite_notify_times == 0):
|
||||
if not (elite_notify_times == 0 and self._last_elite_notify_times == 255):
|
||||
print(datetime.now(), 'device', str(self.device), 'elite_notify_times:', elite_notify_times, 'self._elite_notify_times:', self._last_elite_notify_times, flush = True)
|
||||
self._last_mem_wrong_information = mem_wrong_information
|
||||
self._last_mem_cnt = mem_cnt
|
||||
self._last_elite_notify_times = elite_notify_times
|
||||
|
||||
ram_num = data[47]
|
||||
broken_flag = data[-1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user