Skip to content
Snippets Groups Projects
Commit bb228cf7 authored by 488_MP-4's avatar 488_MP-4
Browse files

Merge branch 'cflib_groundstation' of...

Merge branch 'cflib_groundstation' of https://git.ece.iastate.edu/danc/MicroCART into cflib_groundstation
parents 1112cde1 fd8a982c
No related branches found
No related tags found
5 merge requests!106Adding Pycrocart 2.1,!104adding cflib to this branch,!103Updating develop to current state of master branch,!98Pycrocart 2.1 will,!94Merge cflib adapter into main
......@@ -60,7 +60,7 @@ class LogfileHandler:
self.scf.cf.log.add_config(self.logging_configs[-1])
def refresh_logging_configs() :
def refresh_logging_configs(self):
raise Exception
def load_logging_configs() :
......@@ -103,3 +103,29 @@ class LogfileHandler:
for i in range(0, len(self.logging_configs)):
self.logging_configs[i].stop()
def read_all_active_blocks(self):
active_blocks = []
logBlockFile = open("/home/bitcraze/Desktop/groundstation/crazyflie_groundstation/loggingBlocks.txt", "r")
line = "BEGIN"
while line != "":
line = logBlockFile.readline()
formatLine = line.strip()
if len(formatLine) == 0 or formatLine[0] == '#':
continue
elif formatLine == "START BLOCK":
print(line)
data = []
for i in range(0,6):
newLine = logBlockFile.readline().strip()
if newLine == "" or newLine == "END BLOCK":
raise Exception("loggingBlocks.txt is not formatted correctly")
if i == 0 or i == 2:
data.append(int(newLine))
else:
data.append(newLine)
if len(data) != 6 or logBlockFile.readline().strip() != "END BLOCK":
raise Exception("loggingBlocks.txt is not formatted correctly")
File deleted
File deleted
File deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment