Skip to content

Commit

Permalink
Fix for old devices
Browse files Browse the repository at this point in the history
  • Loading branch information
bkerler committed Jan 7, 2021
1 parent 014ea4f commit 91875e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Library/firehose.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def xmlsend(self, data, skipresponse=False):
else:
status = True
resp = {"value":"ACK"}
time.sleep(0.02)
return [status, resp, rdata]

def cmd_reset(self):
Expand Down Expand Up @@ -286,7 +285,7 @@ def cmd_program(self, physical_partition_number, start_sector, filename, display
data += self.modules.addprogram()
data += f"/>\n</data>"
rsp = self.xmlsend(data)

time.sleep(0.01)
if display:
print_progress(prog, 100, prefix='Progress:', suffix='Complete', bar_length=50)
if rsp[0]:
Expand Down Expand Up @@ -358,7 +357,7 @@ def cmd_program_buffer(self, physical_partition_number, start_sector, wfdata, di
data += self.modules.addprogram()
data += f"/>\n</data>"
rsp = self.xmlsend(data)

time.sleep(0.01)
if display:
print_progress(prog, 100, prefix='Progress:', suffix='Complete', bar_length=50)
if rsp[0]:
Expand Down Expand Up @@ -428,6 +427,7 @@ def cmd_erase(self, physical_partition_number, start_sector, num_partition_secto
data += self.modules.addprogram()
data += f"/>\n</data>"
rsp = self.xmlsend(data)
time.sleep(0.01)
if display:
print_progress(prog, 100, prefix='Progress:', suffix='Complete', bar_length=50)
if rsp[0]:
Expand Down Expand Up @@ -485,6 +485,7 @@ def cmd_read(self, physical_partition_number, start_sector, num_partition_sector
f" start_sector=\"{cursector}\"/>\n</data>"

rsp = self.xmlsend(data, self.skipresponse)
time.sleep(0.01)
if rsp[0]:
if "value" in rsp[1]:
if rsp[1]["value"] == "NAK":
Expand Down

0 comments on commit 91875e7

Please sign in to comment.