forked from Dniel97/artemis
adb: fix for felica_lookup_ex, for #32
This commit is contained in:
parent
fd50a7ee68
commit
92567504f4
@ -36,7 +36,7 @@ class ADBFelicaLookup2Request(ADBBaseRequest):
|
|||||||
self.card_key_ver, self.write_ct, self.maca, company, fw_ver, self.dfc = struct.unpack_from("<16s16sQccH", data, 0x40)
|
self.card_key_ver, self.write_ct, self.maca, company, fw_ver, self.dfc = struct.unpack_from("<16s16sQccH", data, 0x40)
|
||||||
self.idm = hex(idm)[2:].upper()
|
self.idm = hex(idm)[2:].upper()
|
||||||
self.pmm = hex(pmm)[2:].upper()
|
self.pmm = hex(pmm)[2:].upper()
|
||||||
self.company = CompanyCodes(company)
|
self.company = CompanyCodes(int.from_bytes(company, 'little'))
|
||||||
self.fw_ver = ReaderFwVer.from_byte(fw_ver)
|
self.fw_ver = ReaderFwVer.from_byte(fw_ver)
|
||||||
|
|
||||||
class ADBFelicaLookup2Response(ADBBaseResponse):
|
class ADBFelicaLookup2Response(ADBBaseResponse):
|
||||||
@ -50,8 +50,8 @@ class ADBFelicaLookup2Response(ADBBaseResponse):
|
|||||||
def make(self) -> bytes:
|
def make(self) -> bytes:
|
||||||
resp_struct = Struct(
|
resp_struct = Struct(
|
||||||
"user_id" / Int32sl,
|
"user_id" / Int32sl,
|
||||||
"relation1" / Int16sl,
|
"relation1" / Int32sl,
|
||||||
"relation2" / Int16sl,
|
"relation2" / Int32sl,
|
||||||
"access_code" / Int8ub[10],
|
"access_code" / Int8ub[10],
|
||||||
"portal_status" / Int8ub,
|
"portal_status" / Int8ub,
|
||||||
"company_code" / Int8ub,
|
"company_code" / Int8ub,
|
||||||
|
Loading…
Reference in New Issue
Block a user