mirror of
https://github.com/bkerler/edl.git
synced 2025-03-13 16:53:26 -04:00
Fix wrong renaming
This commit is contained in:
parent
7e86613ee2
commit
5ef9472c7b
3 changed files with 22 additions and 22 deletions
|
@ -572,7 +572,7 @@ class sahara(metaclass=LogBase):
|
|||
sys.exit(1)
|
||||
return self.mode
|
||||
else:
|
||||
self.error(self.get_error_desc(pkt.image_tx_status))
|
||||
self.error(self.get_error_desc(pkt.image_id))
|
||||
return "error"
|
||||
else:
|
||||
self.error("Unknown response received on uploading loader.")
|
||||
|
|
|
@ -268,7 +268,7 @@ class CommandHandler:
|
|||
cmd = st.dword()
|
||||
len = st.dword()
|
||||
image_id = st.dword()
|
||||
status = st.dword()
|
||||
image_tx_status = st.dword()
|
||||
|
||||
return req
|
||||
|
||||
|
|
|
@ -70,14 +70,14 @@ diagerror = {
|
|||
nvitem_type = [
|
||||
("item", "H"),
|
||||
("rawdata", "128s"),
|
||||
("image_tx_status", "H")
|
||||
("status", "H")
|
||||
]
|
||||
|
||||
subnvitem_type = [
|
||||
("item", "H"),
|
||||
("index", "H"),
|
||||
("rawdata", "128s"),
|
||||
("image_tx_status", "H")
|
||||
("status", "H")
|
||||
]
|
||||
|
||||
|
||||
|
@ -460,27 +460,27 @@ class qcdiag(metaclass=LogBase):
|
|||
return res
|
||||
|
||||
def DecodeNVItems(self, nvitem):
|
||||
if nvitem.image_tx_status == 0x1:
|
||||
if nvitem.status == 0x1:
|
||||
return "Internal DMSS use"
|
||||
elif nvitem.image_tx_status == 0x2:
|
||||
elif nvitem.status == 0x2:
|
||||
return "Unrecognized command"
|
||||
elif nvitem.image_tx_status == 0x3:
|
||||
elif nvitem.status == 0x3:
|
||||
return "NV memory full"
|
||||
elif nvitem.image_tx_status == 0x4:
|
||||
elif nvitem.status == 0x4:
|
||||
return "Command failed"
|
||||
elif nvitem.image_tx_status == 0x5:
|
||||
elif nvitem.status == 0x5:
|
||||
return "Inactive Item"
|
||||
elif nvitem.image_tx_status == 0x6:
|
||||
elif nvitem.status == 0x6:
|
||||
return "Bad Parameter"
|
||||
elif nvitem.image_tx_status == 0x7:
|
||||
elif nvitem.status == 0x7:
|
||||
return "Item was read-only"
|
||||
elif nvitem.image_tx_status == 0x8:
|
||||
elif nvitem.status == 0x8:
|
||||
return "Item not defined for this target"
|
||||
elif nvitem.image_tx_status == 0x9:
|
||||
elif nvitem.status == 0x9:
|
||||
return "No more free memory"
|
||||
elif nvitem.image_tx_status == 0xA:
|
||||
elif nvitem.status == 0xA:
|
||||
return "Internal use"
|
||||
elif nvitem.image_tx_status == 0x0:
|
||||
elif nvitem.status == 0x0:
|
||||
return "OK"
|
||||
return ""
|
||||
|
||||
|
@ -495,7 +495,7 @@ class qcdiag(metaclass=LogBase):
|
|||
ItemNumber = hex(item) + ": "
|
||||
returnanswer = "NVItem " + ItemNumber + info
|
||||
print(returnanswer)
|
||||
if nvitem.image_tx_status == 0:
|
||||
if nvitem.status == 0:
|
||||
print("-----------------------------------------")
|
||||
print(self.prettyprint(nvitem.data))
|
||||
else:
|
||||
|
@ -513,7 +513,7 @@ class qcdiag(metaclass=LogBase):
|
|||
ItemNumber = hex(item) + "," + hex(index) + ": "
|
||||
returnanswer = "NVItem " + ItemNumber + info
|
||||
print(returnanswer)
|
||||
if nvitem.image_tx_status == 0:
|
||||
if nvitem.status == 0:
|
||||
print("-----------------------------------------")
|
||||
print(self.prettyprint(nvitem.data))
|
||||
else:
|
||||
|
@ -532,10 +532,10 @@ class qcdiag(metaclass=LogBase):
|
|||
old = prog
|
||||
res, nvitem = self.read_nvitem(item)
|
||||
if res != False:
|
||||
if nvitem.image_tx_status != 0x5:
|
||||
nvitem.image_tx_status = self.DecodeNVItems(nvitem)
|
||||
if nvitem.status != 0x5:
|
||||
nvitem.status = self.DecodeNVItems(nvitem)
|
||||
nvitems.append(dict(id=nvitem.item, name=nvitem.name, data=hexlify(nvitem.data).decode("utf-8"),
|
||||
status=nvitem.image_tx_status))
|
||||
status=nvitem.status))
|
||||
else:
|
||||
errors += nvitem + "\n"
|
||||
pos += 1
|
||||
|
@ -573,7 +573,7 @@ class qcdiag(metaclass=LogBase):
|
|||
if item in self.nvlist:
|
||||
name = self.nvlist[item]
|
||||
data = self.unpackdata(res["rawdata"])
|
||||
res = nvitem(res["item"], 0, data, res["image_tx_status"], name)
|
||||
res = nvitem(res["item"], 0, data, res["status"], name)
|
||||
return [True, res]
|
||||
elif data[0] == 0x14:
|
||||
return [False, f"Error 0x14 trying to read nvitem {hex(item)}."]
|
||||
|
@ -595,7 +595,7 @@ class qcdiag(metaclass=LogBase):
|
|||
if item in self.nvlist:
|
||||
name = self.nvlist[item]
|
||||
data = self.unpackdata(res["rawdata"])
|
||||
res = nvitem(res["item"], index, data, res["image_tx_status"], name)
|
||||
res = nvitem(res["item"], index, data, res["status"], name)
|
||||
return [True, res]
|
||||
elif data[0] == 0x14:
|
||||
return [False, f"Error 0x14 trying to read nvitem {hex(item)}."]
|
||||
|
|
Loading…
Reference in a new issue