software/dump/sigrok: rename capture file to dump

This commit is contained in:
Florent Kermarrec 2017-06-22 19:20:34 +02:00
parent b57a5f9369
commit dff7ac8d4e
1 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ class SigrokDump(Dump):
sigrok version = 0.2.0 sigrok version = 0.2.0
[device 1] [device 1]
driver = litescope driver = litescope
capturefile = logic-1 capturefile = dump
unitsize = 1 unitsize = 1
total probes = {} total probes = {}
samplerate = {} KHz samplerate = {} KHz
@ -55,7 +55,7 @@ samplerate = {} KHz
except: except:
pass pass
datas.append(data) datas.append(data)
f = open("logic-1", "wb") f = open("dump", "wb")
for data in datas: for data in datas:
f.write(data.to_bytes(data_bits//8, "big")) f.write(data.to_bytes(data_bits//8, "big"))
f.close() f.close()
@ -65,7 +65,7 @@ samplerate = {} KHz
os.chdir(name) os.chdir(name)
f.write("version") f.write("version")
f.write("metadata") f.write("metadata")
f.write("logic-1") f.write("dump")
os.chdir("..") os.chdir("..")
f.close() f.close()
@ -112,7 +112,7 @@ samplerate = {} KHz
def read_data(self, name, nprobes): def read_data(self, name, nprobes):
datas = [] datas = []
f = open("logic-1", "rb") f = open("dump", "rb")
while True: while True:
data = f.read(math.ceil(nprobes/8)) data = f.read(math.ceil(nprobes/8))
if data == bytes('', "utf-8"): if data == bytes('', "utf-8"):