mirror of https://github.com/ArduPilot/ardupilot
LogAnalyzer: Update to include the new "format" argument, and fix scoping on two new tests.
This commit is contained in:
parent
406fedf727
commit
179d854a26
|
@ -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'''
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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…
Reference in New Issue