Andrew Tridgell
e3c9f10e91
AP_Logger: revived block based logging
6 years ago
Peter Barker
6fc76a32af
GLOBAL: use AP::logger() and strip redundant Log_ from methods
6 years ago
Peter Barker
b47733142f
GLOBAL: rename DataFlash_Class to AP_Logger
6 years ago
Peter Barker
6a59dd04a7
DataFlash: rename to AP_Logger
6 years ago
Andrew Tridgell
1d6b58f9ca
DataFlash: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
6 years ago
Peter Barker
fa7ba7ddbc
DataFlash: force messagewriters to completion
...
Setting a dataflash-file buffer size of less than or equal to 2kiB would
cause the startup-messagewriter to never push any messages other than
FMT out to the logs.
This is a combination of the return values of
critical_message_reserved_space and
non_messagewriter_message_reserved_space
This patch forces the startup messages out to the logs by ignoring the
space constraints every 100ms
7 years ago
murata
396517fe58
DataFlash: Delete unused arguments.
7 years ago
Peter Barker
493f958eb2
DataFlash: remove unused ReadBlock method
7 years ago
Andrew Tridgell
777b4c8cfe
DataFlash: avoid stat of current log file
...
this avoids getting invalid data base for stat() for the current log
file.
It also only gives up writing to a log file if writes fail for 2
seconds. This avoids a temporary write failure causing the log to be
closed (that can happen on ChibiOS with directory listing while writing)
7 years ago
Francisco Ferreira
221ba177c5
DataFlash: remove Qualcomm board support
7 years ago
Peter Barker
8027883734
DataFlash: remove vestiges of CLI functions
7 years ago
Andrew Tridgell
43a6ed4099
DataFlash: support ChibiOS FATFS implementation
7 years ago
Peter Barker
3af5be76aa
DataFlash: protect write fd with semaphore
...
If the sensor threads are using WriteBlock they may pass the _write_fd
== -1 check but then have that set to -1 by the main thread
7 years ago
Peter Barker
9783c0c3ba
DataFlash: log dataflash-file statistics periodically
8 years ago
Peter Barker
975d2fd0d1
DataFlash: add debug for io thread failure
8 years ago
Peter Barker
0769432e63
DataFlash: move log-write-started logic to be backend-specific
8 years ago
Peter Barker
1f0a14ab33
DataFlash: add PrepForArming method
8 years ago
Peter Barker
b572c13ca9
DataFlash: move starting of new logs into DataFlash
8 years ago
Peter Barker
4234f4ef7a
DataFlash: move _initialised into DataFlash_Backend
8 years ago
Peter Barker
001d3a7118
DataFlash: correct consts on CardInserted
8 years ago
Peter Barker
0be2e7962f
DataFlash: create a WritesOK method for WritePrioritisedBlock
8 years ago
Peter Barker
9324d8e251
Dataflash: emit io thread warnings much less frequently
8 years ago
Peter Barker
d8c475ad04
DataFlash: use override keyword on many methods
8 years ago
Peter Barker
057819ccef
DataFlash: zero-pad the number in the log filename
...
This helps with collating when reviewing log files
Closes #2212
8 years ago
Peter Barker
bc45ab5409
DataFlash: add a heartbeat for the io thread in DataFlash_File
8 years ago
Peter Barker
e11c276b35
DataFlash_File: stop trying to stuff a uint64_t into a uint32_t
8 years ago
Peter Barker
2c8a0a9123
DataFlash: rotate files when vehicle is disarmed
8 years ago
Murilo Belluzzo
a91da2e803
DataFlash: Change ::bufferspace_available return type
...
from 'uint16_t' to 'uint32_t' to avoid overflow (possible in at least
two implementations: Block and File).
8 years ago
Murilo Belluzzo
c112e1c889
DataFlash: Make use of ByteBuffer class
...
This patch replaces the 'old style' ringbuffer by the ByteBuffer class.
An effort was made to keep the exchange as close as possible from a
drop-in replacement to minimize the risk of introducing bugs.
Although the exchange opens opportunities for improvement and
simplification of this class.
8 years ago
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
8 years ago
Peter Barker
a10cde35f5
DataFlash: stop logging before filling SD card on PX4
...
Filling the SD card causes NuttX to have conniptions, including
data loss and failure to boot
8 years ago
Peter Barker
8d253dec8e
DataFlash: support for mavlink SENSOR message
9 years ago
Lucas De Marchi
ec36e06c63
DataFlash: replace header guard with pragma once
9 years ago
Andrew Tridgell
b967140572
DataFlash: enable minimal file mode
...
This adds a "minimal" dataflash mode with a board specific macro. The
QURT port uses this to avoid problematic system calls that are buggy
in the QURT RTOS
With some pending updates to QURT we may be able to remove some (or
all) of this
9 years ago
Andrew Tridgell
02d7867d79
DataFlash: added locking for multi-thread logging support
9 years ago
Peter Barker
7900359fac
DataFlash: LOG_FILE_BUFSIZE sets buffer size for DataFlash_File
9 years ago
Peter Barker
faabe0b83d
DataFlash: support multiple simultaneous backends
9 years ago
Peter Barker
fc05ad81eb
DataFlash_File: cache oldest log to avoid directory scans when downloading
9 years ago
Peter Barker
e481497574
DataFlash: delete oldest file rather than the lowest-numbered file
...
Also reference log numbers by their list index to accomodate log number
wrapping in DataFlash_File
9 years ago
Andrew Tridgell
b0aa7cb990
DataFlash: use new perf API
9 years ago
Peter Barker
8f1471c137
DataFlash: leave room in buffer for non-startup messages
10 years ago
Peter Barker
60010e794e
DataFlash: ensure 10% free space when initialising logging
10 years ago
Peter Barker
8f8493225c
DataFlash: DFMessageWriter; ability to trickle messages out to DF
10 years ago
Peter Barker
844f050cf3
DataFlash: correct zero-byte-file handling in CLI
...
-rw-rw-r-- 1 pbarker pbarker 2105344 Jul 1 16:10 1.BIN
-rw-rw-r-- 1 pbarker pbarker 0 Jul 1 19:35 2.BIN
-rw-rw-r-- 1 pbarker pbarker 2494464 Jul 1 16:58 3.BIN
-rw-rw-r-- 1 pbarker pbarker 128503808 Jul 1 20:22 4.BIN
-rw-rw-r-- 1 pbarker pbarker 3 Jul 1 19:46 LASTLOG.TXT
Before fix:
2 logs
Log 3 in logs/3.BIN of size 2494464 2015/7/1 6:58
Log 4 in logs/4.BIN of size 128503808 2015/7/1 10:22
After Fix:
4 logs
Log 1 in logs/1.BIN of size 2105344 2015/7/1 6:10
Log 2 in logs/2.BIN of size 0 2015/7/1 9:35
Log 3 in logs/3.BIN of size 2494464 2015/7/1 6:58
Log 4 in logs/4.BIN of size 128503808 2015/7/1 10:22
If the last file was zero bytes, no files would be shown.
10 years ago
Peter Barker
c5c39a77a3
DataFlash: method to flush ringbuffer to fd
10 years ago
Peter Barker
723c37bcf7
DataFlash: backend/frontend split
10 years ago
Andrew Tridgell
73445fdae9
DataFlash: added error checking and fixed a warning
10 years ago
Andrew Tridgell
b5d930be61
DataFlash: support member functions for rover
10 years ago
Andrew Tridgell
2dfe3cb844
DataFlash: added a perf counter for microSD overruns
...
this allows us to tell if a microSD can handle a high logging rate
10 years ago
Andrew Tridgell
c93ae67541
DataFlash: don't try and open logfile on failure more than once
...
this prevents a corrupted microSD card from causing a continuous
attempt to open a log file while in flight, which can cause large
scheduler delays
Pair-Programmed-With: Grant Morphett <grant@gmorph.com>
10 years ago