1
0
mirror of https://github.com/Rhinemann/IoT-Systems.git synced 2026-03-14 20:50:39 +02:00

feat: get indexes of file header fields

This commit is contained in:
ІМ-24 Владислав Коваленко 2026-03-03 14:10:18 +00:00
parent 95176ea467
commit a899ef6a6e

View File

@ -16,6 +16,10 @@ class FileReader:
self.file = open(self.file_path, newline='') self.file = open(self.file_path, newline='')
self.file_reader = reader(self.file) self.file_reader = reader(self.file)
file_header = next(self.file_reader) file_header = next(self.file_reader)
self.x_idx = file_header.index('X')
self.y_idx = file_header.index('Y')
self.z_idx = file_header.index('Z')
def stopReading(self, *args, **kwargs): def stopReading(self, *args, **kwargs):
if self.file: if self.file: