Skip to content

Commit 8343047

Browse files
committed
remove duplicate files between T-SD-Card and T-Main
1 parent ca36cf0 commit 8343047

File tree

5 files changed

+6
-1099
lines changed

5 files changed

+6
-1099
lines changed

Telemetry-Main/fsdaq_decoder.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@
2323
"f5": np.float32,
2424
"f6": np.float64,
2525
"b0": bool
26-
}
26+
}
2727

28-
with open (args.input_file, "rb" ) as f:
29-
# f = open("test.fsdaq", "rb")
30-
df = pl.DataFrame()
28+
with open(args.input_file, "rb" ) as f:
3129
batchlen = 0
3230
data = f.read()
33-
# print(ascii(data))
3431
header = ascii(data[:8])
3532
m = np.frombuffer(data[8:12], dtype=np.uint32, count=1)[0]
3633
n = np.frombuffer(data[12:16], dtype=np.uint32, count=1)[0]
@@ -48,13 +45,13 @@
4845
colType = data[pos:pos+2].decode('ascii')
4946
colTypes.append((types_dict[colType], int((2**int(colType[1]))/8*n)))
5047
pos += 2
51-
# print(colTypes)
5248
data_left = len(data[pos:])
5349
len_of_frame = sum([x[1] for x in colTypes])
5450
chunks = np.floor(data_left / len_of_frame)
5551
misc_bytes = (data_left % len_of_frame) - 8
5652
print(f"chunks left: {chunks}")
5753
print(f"misc bytes left: {misc_bytes}")
54+
frames = []
5855
for i in range(int(chunks)):
5956
frame_pieces = []
6057
for i in range(m):
@@ -79,12 +76,8 @@
7976
frame_piece_series = pl.Series(colTitles[i], col_bit)
8077
frame_pieces.append(frame_piece_series)
8178
pos += col_byte_len
82-
frame_piece = pl.DataFrame(frame_pieces)
83-
# print(frame_pieces)
84-
if df.is_empty():
85-
df = frame_piece
86-
else:
87-
df = df.vstack(frame_piece)
88-
# print(df)
79+
frames.append(pl.DataFrame(frame_pieces))
80+
df = pl.concat(frames, how="vertical")
81+
# print(df)
8982
print(f"Stuff Left: {ascii(data[pos:])}")
9083
df.write_csv(args.output_file)

Telemetry-SD-Card/dbc_to_cpp.py

Lines changed: 0 additions & 245 deletions
This file was deleted.

Telemetry-SD-Card/decoder.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)