Commit Graph

46 Commits

Author SHA1 Message Date
Andrew Tridgell 89ec6ac645 AP_Logger: added VER.FV for filter version 2024-03-16 06:54:27 +11:00
Pierre Kancir d98a400d9e AP_Logger: Prepare the maximum number of log files in the config parameter 2023-11-22 18:35:21 +11:00
xianglunkai 4f00dfa69a correct the filling order of the struct, otherwise it may cause compilation errors 2023-11-10 17:12:17 +11:00
Iampete1 1bfe83bb63 AP_Logger: log rally point flags field 2023-11-01 19:06:39 +11:00
Andrew Tridgell 69371e84fd AP_Logger: added build directory to VER message
this allows log review tools to use right parameter and mode map when vendor has changed the
vehicle type strings
2023-10-13 15:13:10 +11:00
Peter Barker eb344ee35c AP_Logger: remove AP_Logger.h include in AP_Logger_Backend
Don't need the storage size in the header
2023-09-09 17:35:15 +10:00
Peter Barker 198268e03c AP_Logger: use HAL_LOGGING_ENABLED defines 2023-09-06 20:26:25 +10:00
Peter Barker 771f8855b7 AP_Logger: correct use of nullptr in SITL structure sanity checks
A developer might be able to craft a fault such that s could be nullptr here.  They would need to work at it, but we can do better.
2023-08-14 22:25:50 +10:00
Peter Barker e5dda42056 AP_Logger: remove requirement to know storage type of fence item in headers 2023-06-24 14:21:01 +10:00
Andrew Tridgell 48acb1a2f7 AP_Logger: added LOG_DARM_RATEMAX
this sets the logging rate max when disarmed. In combination with
LOG_DISARMED=3 it gives a very nice setup to get always on logging
with very little addition to the log sizes. It is particularly useful
in combination with LOG_REPLAY=1
2023-04-14 07:48:24 +10:00
Peter Barker 6eda22e7de AP_Logger: do not rotate logs when disarming if we are replay-logging 2023-04-14 07:47:33 +10:00
Iampete1 1df00d879a AP_Logger: add option allocate scripting format strings in msg_fmt_for_name 2022-11-08 10:49:43 +11:00
Peter Barker 8e06d5cd36 AP_Logger: include required AP_Vehicle_Type header 2022-11-02 18:35:48 +11:00
Iampete1 47853383b1 AP_Logger: add fence message writer 2022-08-30 09:07:27 +10:00
Henry Wurzburg a395b3d2a8 AP_Logger: add AUX switch to pause logging of streamed entries 2022-08-02 10:15:08 +10:00
Peter Barker 659f801650 AP_Logger: remove unused includes 2022-07-20 17:32:24 +10:00
RuffaloLavoisier 0e0c23a8e3 AP_Logger : correct spelling on comment 2022-07-11 08:51:27 +09: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
Peter Barker 85b4ee289e AP_Logger: log VER - ArduPilot version information 2022-02-09 18:32:38 +11:00
Andrew Tridgell 872cae6063 AP_Logger: fixed rate limiting of WriteV messages 2021-08-18 10:20:03 +10:00
bugobliterator 6bbfe35c73 AP_Logger: do not use AP_Scheduler for AP_Periph builds 2021-08-12 07:57:12 +10:00
Andrew Tridgell 4dfe750d71 AP_Logger: handle instance types in rate limiting 2021-08-03 10:23:36 +10:00
Andrew Tridgell 662f7a0191 AP_Logger: added LOG_FILE_RATEMAX parameter
this allows for a global "maximum rate in Hz for streaming messages"
setting
2021-08-03 10:23:36 +10:00
Peter Barker 151fe6facf AP_Logger: rearrange PrepForArming stuff 2021-06-15 16:42:02 +10:00
Andrew Tridgell 806fdd9389 AP_Logger: moved log file open to logger thread
this prevents a watchdog if the filesystem takes a long time to
respond to a file open
2021-06-15 16:42:02 +10:00
Peter Barker b681dc940a AP_Logger: add support for AP_Logger into AP_Periph 2021-06-08 09:57:55 +10:00
Andrew Tridgell 8fcb03350b AP_Logger: minimal fix for allowing log listing while logging
this prevents loss of log data when listing logs on file backend
2021-05-01 19:21:48 +10:00
Peter Barker 82a28e2a58 AP_Logger: do not log soon after file transfer unless we're armed
mavlink log reads fail randomly, and you end up with a very large number
of log files as we keep closing logs off and then discovering we should
be logging
2021-03-24 08:57:03 +11:00
Patrick José Pereira 18d8f19801 AP_Logger: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Andrew Tridgell 4fdf315760 AP_Logger: use null terminated strings
this prevents logging garbage for strings that are shorter than the
length specifier (eg. 'Z'). This assumes we will not want to log
binary data as strings
2021-01-01 17:30:14 +11:00
Andrew Tridgell 3152da98e1 AP_Logger: skip structure validation in replay 2020-11-10 16:15:45 +11:00
Andrew Tridgell 09aff03edc AP_Logger: support new replay system
added allow_start_ekf and block write method for replay

Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2020-11-10 16:15:45 +11:00
Andy Piper d036b57de3 AP_Logger: stop logs safely in the block logger and asynchronously where possible 2020-09-17 10:45:57 +10:00
Andy Piper 5c554221c7 AP_Logger: address review commenst from #14299 2020-09-06 09:12:59 +10:00
Andy Piper ccb583d092 AP_Logger: make block logger conform to mavlink expectations of numbering
add support for log time to block logger
refactor rotation into backed. Don't start logs when erasing
correct log start logic
separate read and write points so that requesting log information does not corrupt the current log
when starting a new log stop logging first
clear the write buffer when starting a new log
insert utc time when requesting info for the current log
stop logging and request formats again when starting a new log
cope with erase happening while we are logging
keep pushing out startup messages even when format messages are done
don't log to the gcs in the io thread
don't start new logs in the io thread
don't validate logs while erasing
flush logs when stopping logging
account for page header when calculating logs sizes
don't return data when asked for more data than in the log
optimize locking and use separate semaphore to mediate ring buffer access
stop logging when the chip is full and send a notification
calculate logs sizes correctly even when they wrap
read log data correctly even when it wraps
add stats support to block logger
reset dropped when starting a new log
fail logging when the chip is full
refactor critical bufferspace checks
increase messagewriter budget to 250us and to 300us for FMT
2020-09-05 10:20:39 +10:00
Peter Barker 7befe84f0c AP_Logger: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 678d6f43c5 AP_Logger: use existing LoggerMessageWriter to log uploaded missions
Instead of creating a MessageWriter explicitly to log uploaded missions
we fiddle the state of the one stored in the startup message writer.

This has the advantage of being much more likely to log the entire
mission (as the buffer constraint is removed), and with the addition of
a time-remaining check much less likely to cause a timing glitch.
2020-04-15 16:24:40 +10:00
Peter Barker aeb45bf146 AP_Logger: fix extremely unlikely nullptr dereference in SITL sanity checks 2020-03-29 08:07:29 +11:00
Peter Barker 031c97db30 AP_Logger: correct Write() containing 'a' entries 2019-12-11 15:50:42 +11:00
Peter Barker b2d9d7b6a0 AP_Logger: const-struct many structures, use temp for navekf object 2019-08-06 11:45:04 +10:00
Tom Pittenger 027f9afcf8 AP_logger: rename dataflash to logger and refactor the filename logger.bin 2019-03-28 16:40:58 +11:00
Peter Barker ee690e7ab9 AP_Logger: use AP_InternalError for tracking internal errors 2019-03-21 21:34:33 +11:00
Peter Barker 9108eeb8f5 AP_Logger: log rally points into dataflash on upload 2019-02-12 11:48:55 +11:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Peter Barker 6a59dd04a7 DataFlash: rename to AP_Logger 2019-01-18 18:08:20 +11:00