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

This commit is contained in:
Aaron Curtis 2014-07-08 10:49:42 -10:00 committed by Craig Elder
parent 406fedf727
commit 179d854a26
4 changed files with 5 additions and 5 deletions

View File

@ -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):
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'''

View File

@ -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)

View File

@ -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):

View File

@ -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()