Browse Source

LogAnalyzer: Update to include the new "format" argument, and fix scoping on two new tests.

master
Aaron Curtis 11 years ago committed by Craig Elder
parent
commit
179d854a26
  1. 4
      Tools/LogAnalyzer/DataflashLog.py
  2. 2
      Tools/LogAnalyzer/LogAnalyzer.py
  3. 2
      Tools/LogAnalyzer/tests/TestAutotune.py
  4. 2
      Tools/LogAnalyzer/tests/TestBalanceTwist.py

4
Tools/LogAnalyzer/DataflashLog.py

@ -393,7 +393,7 @@ class DataflashLog(object): @@ -393,7 +393,7 @@ class DataflashLog(object):
floatTypes = "fcCeEL"
charTypes = "nNZ"
def __init__(self, logfile=None, ignoreBadlines=False):
def __init__(self, logfile=None, format="auto", ignoreBadlines=False):
self.filename = None
self.vehicleType = "" # ArduCopter, ArduPlane, ArduRover, etc, verbatim as given by header
@ -414,7 +414,7 @@ class DataflashLog(object): @@ -414,7 +414,7 @@ class DataflashLog(object):
self.skippedLines = 0
if logfile:
self.read(logfile, ignoreBadlines)
self.read(logfile, format, ignoreBadlines)
def getCopterType(self):
'''returns quad/hex/octo/tradheli if this is a copter log'''

2
Tools/LogAnalyzer/LogAnalyzer.py

@ -222,7 +222,7 @@ def main(): @@ -222,7 +222,7 @@ def main():
# load the log
startTime = time.time()
logdata = DataflashLog.DataflashLog(args.logfile.name, ignoreBadlines=args.skip_bad) # read log
logdata = DataflashLog.DataflashLog(args.logfile.name, format='auto', ignoreBadlines=args.skip_bad) # read log
endTime = time.time()
if args.profile:
print "Log file read time: %.2f seconds" % (endTime-startTime)

2
Tools/LogAnalyzer/tests/TestAutotune.py

@ -6,7 +6,7 @@ class TestAutotune(Test): @@ -6,7 +6,7 @@ class TestAutotune(Test):
'''test for autotune success (copter only)'''
def __init__(self):
# Test.__init__(self)
Test.__init__(self)
self.name = "Autotune"
def run(self, logdata, verbose):

2
Tools/LogAnalyzer/tests/TestBalanceTwist.py

@ -6,8 +6,8 @@ class TestBalanceTwist(Test): @@ -6,8 +6,8 @@ class TestBalanceTwist(Test):
'''test for badly unbalanced copter, including yaw twist'''
def __init__(self):
Test.__init__(self)
self.name = "Balance/Twist"
self.enable = False # TEMP
def run(self, logdata, verbose):
self.result = TestResult()

Loading…
Cancel
Save