get_mem cleanup

main
sq5bpf 2023-06-26 14:48:41 +02:00
rodzic 74a864f5dd
commit 389cf2e335
1 zmienionych plików z 6 dodań i 6 usunięć

12
uvk5.py
Wyświetl plik

@ -1907,12 +1907,12 @@ class UVK5Radio(chirp_common.CloneModeRadio):
else:
# this memory was't empty, save some bits that we don't know the
# meaning of, or that we don't support yet
prev_0a = ord(_mem.get_raw()[0x0a]) & SAVE_MASK_0A
prev_0b = ord(_mem.get_raw()[0x0b]) & SAVE_MASK_0B
prev_0c = ord(_mem.get_raw()[0x0c]) & SAVE_MASK_0C
prev_0d = ord(_mem.get_raw()[0x0d]) & SAVE_MASK_0D
prev_0e = ord(_mem.get_raw()[0x0e]) & SAVE_MASK_0E
prev_0f = ord(_mem.get_raw()[0x0f]) & SAVE_MASK_0F
prev_0a = _mem.get_raw(asbytes=True)[0x0a] & SAVE_MASK_0A
prev_0b = _mem.get_raw(asbytes=True)[0x0b] & SAVE_MASK_0B
prev_0c = _mem.get_raw(asbytes=True)[0x0c] & SAVE_MASK_0C
prev_0d = _mem.get_raw(asbytes=True)[0x0d] & SAVE_MASK_0D
prev_0e = _mem.get_raw(asbytes=True)[0x0e] & SAVE_MASK_0E
prev_0f = _mem.get_raw(asbytes=True)[0x0f] & SAVE_MASK_0F
_mem.set_raw("\x00" * 10 +
chr(prev_0a) + chr(prev_0b) + chr(prev_0c) +
chr(prev_0d) + chr(prev_0e) + chr(prev_0f))