Compare commits
10 Commits
c1f3d3262b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 26841ba30e | |||
| dc6e7be012 | |||
| cf8bdd5b5c | |||
| a1dec94f1f | |||
| 068b026473 | |||
| 16c92aa730 | |||
| 2bf0e01f20 | |||
| ebad5bbfc6 | |||
| 675d952752 | |||
| 587ba5245c |
BIN
BF_companion
BIN
BF_companion
Binary file not shown.
2
makefile
2
makefile
@ -45,6 +45,6 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(CC) main.c $(FLAGS) -ll502api -le502api -lx502api -o BF_companion
|
$(CC) main.c $(FLAGS) -ll502api -le502api -lx502api -g -o BF_companion
|
||||||
clean:
|
clean:
|
||||||
-rm BF_companion
|
-rm BF_companion
|
||||||
|
|||||||
41
plotter.py
41
plotter.py
@ -15,21 +15,42 @@ if __name__ == "__main__":
|
|||||||
main()
|
main()
|
||||||
else:
|
else:
|
||||||
f = open(argv[1], "rt")
|
f = open(argv[1], "rt")
|
||||||
f.readline()
|
data = {}
|
||||||
X = []
|
values_N = 0
|
||||||
Y = []
|
|
||||||
for line in f:
|
for line in f:
|
||||||
|
#print(line)
|
||||||
|
#print(line, len(line))
|
||||||
|
len_line = len(line)
|
||||||
try:
|
try:
|
||||||
i, x, y = line.split()
|
if (len_line >= 11):
|
||||||
x = float(x)
|
if (line[:2] == "0x"):
|
||||||
y = float(y)
|
values_N += 1
|
||||||
X.append(x)
|
header = line[2:4]
|
||||||
Y.append(y)
|
value = line[4:10]
|
||||||
|
if not(header in data):
|
||||||
|
print("New msg type!")
|
||||||
|
print(line)
|
||||||
|
data[header] = []
|
||||||
|
data[header + "_N"] = []
|
||||||
|
data[header + "_hex"] = []
|
||||||
|
data[header].append(int(value,16))
|
||||||
|
data[header + "_hex"].append(value)
|
||||||
|
data[header + "_N"].append(values_N)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
if (values_N > 10000):
|
||||||
|
# break
|
||||||
|
pass
|
||||||
f.close()
|
f.close()
|
||||||
print("data samples:",len(X))
|
print("data samples:", values_N)
|
||||||
chart = go.Figure()
|
chart = go.Figure()
|
||||||
chart.add_trace(go.Scatter(x=X, y=Y))
|
for key, val in data.items():
|
||||||
|
if (key.count("_N") + key.count("_hex")) == 0:
|
||||||
|
#print(key+"_hex :", data[key+"_hex"])
|
||||||
|
chart.add_trace(go.Scattergl(x=data[key+"_N"], y=data[key], name=key, mode="lines", text=data[key+"_hex"]))
|
||||||
|
# chart.add_trace(go.Scattergl(x=data[key+"_N"], y=data[key], name=key, mode="lines+markers", text=data[key+"_hex"]))
|
||||||
|
chart.update_layout(title=argv[1])
|
||||||
chart.show()
|
chart.show()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user