Commit Graph

111 Commits

Author SHA1 Message Date
Luiz Georg b59a2143ae Tools/LogAnalyzer: fix python2/3 compatibility 2022-07-19 22:01:31 +10:00
Luiz Georg d76f3d71ae Tools/LogAnalyzer: pass flake8
`TestDualGyroDrift.py` ignored because it is mostly commented out code
2022-07-19 22:01:31 +10:00
Luiz Georg da0c365f3d Tools/LogAnalyzer: Use more specific exceptions 2022-07-19 22:01:31 +10:00
Luiz Georg 42f202d0ff Tools/LogAnalyzer: apply Black and isort 2022-07-19 22:01:31 +10:00
Randy Mackay 65d8cff1f2 Tools: LogAnalyzer checks MNT_RC_RATE 2022-06-21 13:37:11 +09:00
Andrew Tridgell 9ee140cbbf Tools: revert compass parameter changes 2021-12-04 16:51:53 +11:00
Iampete1 b9c14b6cac Tools: loganalyzer: use new compass params 2021-11-30 08:14:43 +09:00
murata 690d64d664 LogAnalyzer: Support for decacopters 2020-12-08 11:59:10 +11:00
Peter Barker 2eeac9e6fd Tools: LogAnalyzer: Python3 fixes 2020-07-17 11:16:06 +10:00
Peter Barker 642935fd43 Tools: random Python cleanups based on lgtm analysis 2019-09-21 22:26:03 +10:00
Peter Barker bead34be98 Tools: LogAnalyzer: correct to understand field type 'a' 2019-04-27 08:43:36 +10:00
Randy Mackay d5df8312ad Tools: LogAnalyzer updated to use FLOW_TYPE 2019-04-08 11:26:59 +09:00
Peter Barker 65bfe322af Tools: LogAnalyzer: cope with text version of mode in MODE line 2018-12-26 13:12:25 +09:00
Peter Barker 29042c95eb Tools: LogAnalyzer: understand more fields are allowed to have floats in 2018-12-25 00:27:06 +11:00
Peter Barker a8fa17e7fd Tools: LogAnalyzer: exempt CTUN.DSAlt from NaN check 2018-11-29 08:35:39 +11:00
Peter Barker 3dc6c34465 Tools: LogAnalyzer: fix various Tests for newer-style logs
Tools: LogAnalyzer: don't continue if we fail to set vehicle type from MSG

Tools: LogAnalyzer: cope with renamed CTUN.BarAlt attribute

Tools: LogAnalyzer: cope with renamed CTUN.BarAlt attribute

Tools: LogAnalyzer: cope with missing THR_MIN parameter
2017-12-02 09:26:09 +11:00
Peter Barker 7257fb6284 Tools: LogAnalyzer: correct join() in GPSGlitch test 2017-12-01 10:30:56 +11:00
Peter Barker 6bd5ac78f5 Tools: LogAnalyzer: fix string-method-on-int bug for unknown modes 2017-09-30 09:19:17 +10:00
cclauss c6aaa12e94 Tools: LogAnalyzer: Fix undefined name VehicleType
Tools: TestAutotune.py: Fix undefined name VehicleType

__VehicleType__ is used on line 58 but is never defined or imported.

Tools: TestPerformance.py: Fix undefined name VehicleType

__VehicleType__ is used on line 19 but is never defined or imported.

Tools: TestParams.py: Fix undefine name VehicleType

__VehicleType__ is used on line 21 but is never defined or imported.

Tools: TestThrust.py: Fix undefine name VehicleType

__VehicleType__ is used on line 19 but is never defined or imported.

Tools: TestVibration.py: Fix undefined name VehicleType

__VehicleType__ is used on line 21 but is never defined or imported.
2017-09-30 09:19:01 +10:00
cclauss d91a3250a6 Tools: TestParams.py: Fix undefine name VehicleType
__VehicleType__ is used on lines 47, 53, and 56 but is never defined or imported.  This could result in a NameError runtime exception.
2017-09-29 10:31:30 +10:00
Peter Barker a629bb7f2f Tools: LogAnalyzer: TestGPSGlitch: flake8 compliance 2017-09-28 11:44:54 +10:00
Peter Barker 7a077b5fa1 Tools: LogAnalyzer: TestGPSGlitch: tabs to spaces 2017-09-28 11:43:30 +10:00
cclauss 5729838a85 Tools: UnitTest.py: Change usage of next()
__lit.next()__ is not Python 3 compatible but __next(lit)__ is compatible with both Python 2 and 3.

In Python 2.6 and later, it is safe to merely switch from lit.next() to next(lit). See: http://python3porting.com/improving.html#the-next-next Both the automated tools 2to3 and futurize consider this "fixer" to be a "safe" change as we saw in #6954
2017-09-28 09:45:29 +10:00
cclauss e5256d0bd5 Tools: TestPitchRollCoupling.py: Change usage of next()
__lit.next()__ is not Python 3 compatible but __next(lit)__ is compatible with both Python 2 and 3.
2017-09-24 12:36:03 +10:00
Peter Barker ac3cb355c4 Tools: LogAnalyzer: fix bugs, handle newer log formats
Tools: LogAnalyzer: avoid fatal error if mag data is all zeros

Tools: LogAnalyzer: correct comparisons against logdata.vehicleType

Tools: LogAnalyzer: handle logs with TimeUS in place of TimeMS

Tools: LogAnalyzer: handle logs with CTUN.ThO in place of CTUN.ThrOut

Tools: LogAnalyzer: correct motor average value
2017-09-24 12:34:23 +10:00
Peter Barker 7f2882f54b Tools: LogAnalyzer: cope with renamed GPS fields 2017-09-11 12:05:12 +10:00
Peter Barker 2c0e2aab15 Tools: LogAnalyzer: derive motor count from frame type MSG 2017-09-11 12:01:24 +10:00
cclauss 0f08207bdb Tools: define reduce() for Python 3
`reduce()` is called on line 55.  Python 3 dropped reduce() as a builtin.  https://docs.python.org/3/whatsnew/3.0.html#builtins encourages the rewriting of reduce() calls as explicit for loops or list comprehensions but I am not confident to try that in this context.
2017-08-28 11:43:39 +10:00
cclauss 13894506f4 from math import sqrt
Make the call match the import
2017-08-25 09:04:15 -07:00
cclauss b26b6f07bd from math import sqrt
sqrt() is called on lines 198, 200, 208.  Without this change, sqrt() is an undefined name.
2017-08-25 09:04:15 -07:00
Peter Barker ebc8dc4afc Tools: LogAnalyzer: fix whitespace 2017-07-22 10:40:22 +10:00
Peter Barker a6fd812051 Tools: LogAnalyzer: use repr in place of deprecated backticks 2017-07-22 09:28:28 +10:00
Peter Barker cb56cf38d0 Tools: LogAnalyzer: remove vehicle-type-is-first-MSG-assumption 2017-07-22 09:15:59 +10:00
Peter Barker 44d1c77b0c Tools: LogAnalyzer: use print_function 2017-07-22 09:09:51 +10:00
Peter Barker f5e8facc87 Tools: LogAnalyzer: add NaN check 2017-03-21 09:38:21 +11:00
priseborough f9bf825094 Tools: Add analysis file for optical flow calibration data
Calculate and display recommended values of FLOW_FXSCALE and FLOW_FYSCALE from an optical flow sensor calibration test
Save plots to flow_calibration.pdf file
Save calibration parameters to flow_calibration.param file

Signed-off-by: priseborough <p_riseborough@live.com.au>

Tools: Address optical flow calibration script review comments

Tools: LogAnalyzer: stop executing TestOptFlow on insufficient data
2017-02-08 20:41:36 +11:00
Peter Barker 043b7598d1 Tools: correct error path for corrupt logs 2017-02-07 11:37:38 +11:00
Peter Barker 0168493d8a Tools: correct LogAnalyzer VCC test 2016-11-14 09:18:01 +11:00
Peter Barker 45bc95edeb Tools: LogAnalyzer: handle changed RCOU and parameters in motorbalance 2016-09-08 08:54:50 +10:00
Peter Barker f42df1bc54 Tools: LogAnalyzer: handle MODE lines appearing before vehicle MSGs 2016-09-08 08:41:09 +10:00
Peter Barker 214bca8b30 Tools: LogAnalyzer: correct CTUN test 2016-09-08 08:41:09 +10:00
Peter Barker f1641161d7 Tools: LogAnalyzer: correct Vcc test 2016-09-08 08:41:09 +10:00
Ricardo de Almeida Gonzaga 1062aed91e Tools: Fix typos 2016-05-13 19:20:07 -03:00
Peter Barker e357be3d85 LogAnalyzer: adjust for change in vehicle definition MSG string
We changed from ArduCopter to APM:Copter, breaking parts of the LogAnalyzer

This change has LogAnalyzer canonicalise its output to Ardu{Plane,Rover,Copter}

Also account for change in MODE message - ThrCrs has gone away
2015-10-15 09:40:25 +09:00
Peter Barker 82d36520ad LogAnalyzer: fix for 64-bit ints
Also, sqrt must come from math
Also, d indicates a double (a Python float)
2015-10-14 08:50:38 +09:00
Peter Barker f49aedb639 LogAnalyzer: turn times from strings to ints before doing maths 2015-10-13 19:39:02 +09:00
Peter Barker ec9be695fb LogAnalyzer: don't die if no arm/disarm eveents 2015-07-10 19:00:22 +10:00
Peter Barker 1dba943a10 LogAnalyzer: if no GPS, try GPS2 2015-07-10 19:00:22 +10:00
Peter Barker ce558b2b98 LogAnalyzer: cope with TimeUS
See also: 177f61656f
2015-07-10 19:00:22 +10:00
Jason Martens a08d57149e LogAnalyser: Add double support to DataflashLog.py
Doubles were added to dataflash in commit 3991e0c476.
2015-07-10 18:58:11 +10:00