kopia lustrzana https://github.com/fagci/qs-uvk5-firmware-modder
cleanup
rodzic
098357e189
commit
e8b2cbfc40
4
uvk5.py
4
uvk5.py
|
@ -67,7 +67,7 @@ class UVK5(Serial):
|
|||
preamble = self.read(2)
|
||||
|
||||
if preamble != PREAMBLE:
|
||||
raise ValueError('Bad response (PRE)')
|
||||
raise ValueError('Bad response (PRE)', preamble)
|
||||
|
||||
payload_len = b2i(self.read(2)) + 2 # CRC len
|
||||
payload = xor_comm(self.read(payload_len))
|
||||
|
@ -117,8 +117,6 @@ def main(port, cmd, args):
|
|||
with UVK5(port) as s:
|
||||
print('FW version:', s.get_version())
|
||||
getattr(s, cmd)(*args)
|
||||
# data = s.read_mem(0x0E70, 0x80)[1]
|
||||
# print('0x%x' % b2i(data[:2]), '0x%x' % b2i(data[2:4]), data[4:])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Ładowanie…
Reference in New Issue