Commit Graph

414 Commits

Author SHA1 Message Date
Iampete1 ecc3ae2d05 AP_Logger: Log Structure: remove comma on included AIS structure 2022-07-12 09:39:54 +10:00
RuffaloLavoisier 0e0c23a8e3 AP_Logger : correct spelling on comment 2022-07-11 08:51:27 +09:00
Andy Piper f666ed8ec7 AP_Logger: support W25N01GV flash chips
add separate driver for W25N01GV triggered via HAL_LOGGING_DATAFLASH_DRIVER
move flash_test() into AP_Logger_Block.
cleanup use of 4k sector commands to account for chips that only have block commands
2022-06-08 21:44:21 +10:00
Andrew Tridgell 2c962e46c1 AP_Logger: don't compiler AP_Logger.cpp if logging not enabled
for some reason this fixes f103-GPS build, even though the code wasn't
referenced
2022-06-06 14:50:40 +10:00
Andrew Tridgell a15cf3192d AP_Logger: save crash_dump.bin to sdcard on boot
on each boot write crash_dump.bin to the microSD if it is available
this makes it easier for users to send in their crash dumps, and less
likely they will overwrite it with a fw update
2022-06-06 14:50:40 +10:00
Andrew Tridgell c02aef8a50 AP_Logger: allow for new log msgs in Replay
this makes replay tuning and code testing much easier as up to 10 new
log messages can be added in the replay code
2022-06-01 17:07:41 +10:00
Randy Mackay 5b40808ee8 AP_Logger: error subsystem added for dead reckon failsafe 2022-05-25 20:05:21 +09:00
Andy Piper ccbe62589e AP_Logger: add W25Q128 variant 2022-05-24 10:32:34 +10:00
Iampete1 48b3549158 AP_Logger: RCOUT only log if there is a valid output channel 2022-05-22 12:07:37 +10:00
Iampete1 8110b9ac2d AP_Logger: add loging of servo out 15 to 32 2022-05-22 12:07:37 +10:00
Peter Barker 3cb104f537 AP_Logger: log airspeed primary changes 2022-05-17 10:27:57 +10:00
murata 6102e094be AP_Logger: Console output can be disabled 2022-05-17 09:53:06 +10:00
Tamas Nepusz f91ea8a0dd AP_Logger: make LogStructure non-packed to fix compilation of SITL on Apple M1 2022-05-11 07:54:06 +10:00
Andrew Tridgell 43a947f390 AP_Logger: fixed a bug in wrapped log count
fixes #20687
2022-05-06 06:56:33 +10:00
Peter Barker 750fd2c820 AP_Logger: tidy includes 2022-05-03 09:14:58 +10:00
Andrew Tridgell ed1a5c086b AP_Logger: removed annoying message on missing logs 2022-04-19 11:45:26 +10:00
Andrew Tridgell 93b55e367e AP_Logger: fixed log listing with gap, and EKF error on log list
this fixes two issues:

The first issue that if we are missing a log file in the middle of the
list then it was not possible to download recent logs, as we get the
incorrect value for total number of logs. This happened for me with
107 logs, with log62 missing from the microSD. It would only show 45
available logs, so the most recent logs could not be downloaded.

The second issue is that get_num_logs() was very slow if there were a
lot of log files in a directory. This would cause EKF errors and ESC
resets. Using a opendir/readdir loop is much faster (approx 10x faster
in my testing with 107 logs on a MatekH743).
2022-04-19 11:45:26 +10:00
xianglunkai f7f053191a AP_Logger: must set default fd = -1 2022-04-19 10:00:32 +10:00
Peter Barker e5c40d0e54 AP_Logger: move logging of Beacon into Beacon library 2022-04-13 16:22:19 +10:00
Peter Barker 795427e574 AP_Logger: move logging of Proximity into Proximity library 2022-04-13 16:22:19 +10:00
Peter Barker 23f2055330 AP_Logger: move logging of RPM into RPM library 2022-04-13 16:22:19 +10:00
Peter Barker 0c32eeca2e AP_Logger: stop libraries including AP_Logger.h in .h files
AP_Logger.h is a nexus of includes; while this is being improved over
time, there's no reason for the library headers to include AP_Logger.h
as the logger itself is access by singleton and the structures are in
LogStructure.h

This necessitated moving The PID_Info structure out of AP_Logger's
namespace.  This cleans up a pretty nasty bit - that structure is
definitely not simply used for logging, but also used to pass pid
information around to controllers!

There are a lot of patches in here because AP_Logger.h, acting as a
nexus, was providing transitive header file inclusion in many (some
unlikely!) places.
2022-04-08 19:18:38 +10:00
Peter Barker b80cc9a610 AP_Logger: remove old, unused log metadata for MON 2022-04-06 21:54:15 +10:00
Peter Barker a546bc797c AP_Logger: source IDs and structs from HAL_ChibiOS 2022-04-06 21:54:15 +10:00
Iampete1 0a0178988d AP_Logger: add 1e-9 log multiplyer 2022-04-06 17:22:30 +10:00
Andrew Tridgell 06b6632f30 AP_Logger: fixed @SYS file logging
the key fix is the reset of the fd to -1. Without that fix we only
ever log @SYS/uarts.txt

The timing change is needed to get the files out in a reasonable
time. The function is actually getting called at 100Hz or less, not
1kHz (measured on MatekH743 copter at 400Hz). So we need to run it
faster to get the files logged in a reasonable time
2022-04-06 07:46:29 +10:00
Andrew Tridgell a01ca35939 AP_Logger: increase stack of log_io thread by 256
This was seem on omnibusf4pro, it is a bit too close:

  log_io PRI= 59 sp=0x20015CC0 STACK=144/1656
2022-04-01 19:56:30 +11:00
Andrew Tridgell ee6a7f21ec AP_Logger: added terrain correction logging field 2022-03-28 16:01:21 +11:00
Iampete1 1435fdcf97 AP_Logger: log structure: update airspeed heath probability feild name 2022-03-02 16:14:50 +11:00
Andrew Tridgell e715972264 AP_Logger: reduce the stack log frequency
10Hz is plenty
2022-02-22 12:17:17 +11:00
Peter Barker 67b86867f2 AP_Logger: add LogMessage documentation for PIDN and PIDE 2022-02-17 10:53:41 +11:00
Andy Piper 4f785b4aaa AP_Logger: add @SYS/timers.txt to logged files 2022-02-16 15:28:04 +11:00
Peter Barker 85b4ee289e AP_Logger: log VER - ArduPilot version information 2022-02-09 18:32:38 +11:00
Peter Barker 189c4cc4c7 AP_Logger: add missing documentation for RCI2 message 2022-02-01 22:45:19 +11:00
Andrew Tridgell 94c117fe62 AP_Logger: log original fw string if available 2022-01-19 08:07:45 +11:00
Iampete1 cf1202ae65 AP_Logger: add MOTB message 2022-01-18 10:18:10 +11:00
Mark Whitehorn 5f7f1cff2b AP_Logger: fix _RATEMAX parameter descriptions 2022-01-12 10:15:45 +11:00
Peter Barker fc46fe71f0 AP_Logger: fix memory leak logging files at startup 2022-01-11 14:18:14 +11:00
Andy Piper 835e0be245 AP_Logger: support Winbond W25X32 for KakuteH7Mini 2022-01-11 10:58:55 +11:00
Pierre Kancir a01bd33f69 AP_Logger: fix size compare warning
df_PageSize is uint32_t
2022-01-06 09:13:54 +11:00
Pierre Kancir 7a8cef877b AP_Logger: fix implicit instanciation order, base class first 2022-01-06 09:13:54 +11:00
Pierre Kancir 89e5e7f5c5 AP_Logger: fix clang-tidy warning about non correct check
strncmp return both positive and negative value, therefore is it better to implicitly compare to 0
2022-01-06 09:13:54 +11:00
Pierre Kancir 4add35355e AP_Logger: use nullptr 2022-01-06 09:13:54 +11:00
Iampete1 cee0503812 AP_Logger: add video stab log structure 2022-01-05 19:56:03 +11:00
Pierre Kancir f50f8c7a2a AP_Logger: fix memory leak 2022-01-05 18:07:30 +11:00
Lucas De Marchi 83f20ac66a AP_Logger: fix build with mavlink debug enabled 2022-01-04 07:25:28 -08:00
Lucas De Marchi 1ab005dc99 AP_Logger: use stderr for debug
Make AP_Logger_MAVLink use stderr, so it's easier to follow the debug
outputs without mixing with normal output.  And this is also what
AP_Logger is using.
2022-01-04 07:25:28 -08:00
Shiv Tyagi 3533e1e0ed AP_Logger: remove AP_Logger_SITL
We now use jedec dataflash simulator for this purpose. Hence, we should remove these files and all references to HAL_LOGGING_SITL_ENABLED

Co-Authored-By: Divyateja Pasupuleti <divyateja2004@gmail.com>
2021-12-25 09:14:31 +11:00
Peter Barker 600b085cf3 AP_Logger: correct constraint of maximum message ID 2021-12-21 10:42:18 +11:00
Peter Barker 168f278959 AP_Logger: reallocate 32 IDs from vehicles to main message area
ArduPlane uses ~18 messages and the list is relatively static, so this
should be a reasonable reallocation.

We're using a lot of Log_Write(...) to create messages dynamically - but
that requires IDs and we only left space for about 18 before this patch

More space is left to ease future use of IDs in some libraries
2021-12-21 10:42:18 +11:00