Lucas De Marchi
ec36e06c63
DataFlash: replace header guard with pragma once
9 years ago
Peter Barker
faabe0b83d
DataFlash: support multiple simultaneous backends
9 years ago
Lucas De Marchi
c74b1a660d
DataFlash: remove DATAFLASH_NO_CLI
...
This is not used anymore since the removal of AVR CPUs.
9 years ago
Lucas De Marchi
0dfeae2556
DataFlash: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1
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
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
Gustavo Jose de Sousa
709204c01d
DataFlash: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
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
Randy Mackay
f12d06d76b
DataFlash: typo fix in ListAvailableLogs
11 years ago
Andrew Tridgell
3fa30f91db
DataFlash: avoid CLI functions on APM2 for copter
11 years ago
Andrew Tridgell
ef28d087d2
DataFlash: added logging_started() API
11 years ago
Andrew Tridgell
93140bd956
DataFlash: auto-add FMT headers to binary logs if needed
...
this copes with dataflash wrapping
11 years ago
Andrew Tridgell
e6bafa2d8f
DataFlash: added structures to Init() of dataflash
...
this will allow the get_log_data() call to add FMT headers if a log
has wrapped
11 years ago
Andrew Tridgell
5d53b780ba
DataFlash: added functions for load download support
11 years ago
Andrew Tridgell
3262022195
DataFlash: print FMT messages for wrapped logs
...
this ensures we have FMT messages in every log, even if the log was
wrapped and the FMT messages were overwritten
11 years ago
Andrew Tridgell
411e940342
DataFlash: prevent the dataflash erase problem
...
only allow writes to dataflash block devices once StartNewLog() has
been called
12 years ago
Andrew Tridgell
095505129c
DataFlash: hopefully fixed cause of frequent dataflash erase
...
Wait for 0.1s after erase and before we start writing parameters to
the log
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
12 years ago
Andrew Tridgell
844e1b9ef9
DataFlash: added support for printing flight mode as a string
...
makes analysing logs easier.
Pair-Programmed-With: Randy
12 years ago
Andrew Tridgell
62f190ed15
DataFlash: simplify code now that copter is converted
...
no longer need as many public functions
12 years ago
Andrew Tridgell
916e8d0992
DataFlash: new dataflash logging system
...
this allows us to remove the display functions in the vehicle code,
and also allows us to store the format of a log file in the log. It
also stores the parameters used in a flight, rather than the
parameters set at the time the log is dumped
12 years ago
Andrew Tridgell
da5a5ea368
DataFlash: added file based 'dataflash' logging
12 years ago
Andrew Tridgell
a7541e9ad3
DataFlash: report log number when starting a new log
...
helps with test sketch
12 years ago
Andrew Tridgell
efd2da3eb8
DataFlash: started on file interface
12 years ago
Andrew Tridgell
7b524d15fa
DataFlash: added log_num to dump interface
...
this will be used by the file oriented logging code
12 years ago
Andrew Tridgell
c52ef80f06
DataFlash: added Block layer in classes
...
this will allow the addition of a DataFlash_File implementation of the
DataFlash API which will store logs in a traditional filesystem. That
will align better with the PX4 design, and be more useful for fast
transfer of logs to a host computer
12 years ago
Andrew Tridgell
0ffcffa81c
DataFlash: fixed signed/unsigned errors in API
12 years ago
Andrew Tridgell
9b551f162c
DataFlash: make the public interface much narrower
...
make many variables private, to simplify interface ready for PX4
12 years ago
Andrew Tridgell
20825cc903
DataFlash: removed the byte and word based interfaces
...
simplifing ready for PX4 flash logging
12 years ago
Andrew Tridgell
c6b006cf5f
DataFlash: move log reading logic into common library
12 years ago
Andrew Tridgell
83b074dd87
DataFlash: moved macros into common header
12 years ago
Andrew Tridgell
28a0ba6c4a
DataFlash: added block based dataflash writes
...
these are about 10x faster than the old writes
12 years ago
Pat Hickey
4c930b77a4
DataFlash_Empty defined
12 years ago
Andrew Tridgell
e57834d763
DataFlash: added SITL header
12 years ago
Pat Hickey
7b9b088261
DataFlash: AP_HAL port fixups
12 years ago
Pat Hickey
ef1db1a3fc
DataFlash: don't take a delay_cb
12 years ago
Pat Hickey
cc699a2a4e
DataFlash: conform to ordinary stdint types
...
* s/unsigned char/uint8_t/g
* changed all type 'byte' to uint8_t
12 years ago
uncrustify
08c8dffd48
uncrustify libraries/DataFlash/DataFlash.h
13 years ago
rmackay9
2b24e422de
DataFlash: revert delay callbacks to use "unsigned long"
13 years ago
rmackay9
20cb2e56a0
DataFlash: change "unsigned long" to "uint32_t" in callback functions
13 years ago
rmackay9
94552b57a7
DataFlash: replaced "int" with "int16_t"
13 years ago
Andrew Tridgell
e171720608
DataFlash: fixed SITL build
13 years ago
Andrew Tridgell
dd24330645
DataFlash: fallback to BlockErase if ChipErase fails
...
The errata on the APM2 dataflash chip says that ChipErase may not work
on some chips
13 years ago
Andrew Tridgell
fc73fd6531
DataFlash: use ChipErase() instead of PageErase() on all pages
...
This makes the DataFlash erase much faster (about 6 seconds instead of
about 60 seconds).
We need to test and ensure the behaviour is equivalent apart from the
speed
13 years ago
Andrew Tridgell
5e4f66e525
DataFlash: moved high level logging logic to library
...
this moves out all the high level logic from ArduPlane/ArduCopter to
the library. It also adds a "config page", as the last page in the
flash. This is used to check if the flash needs erasing. We only erase
now if the DF_LOGGING_FORMAT has changed.
This patch also adds a public CardInserted() method, which is used to
disable logging on APM2 if a dataflash card is not inserted
13 years ago
Andrew Tridgell
977326e991
dataflash: reworked classes to move most code to parent class
...
this moves all the non-hardware specific code to the parent
DataFlash_Class class, keeping the hw specific code much smaller and
simpler.
This should prevent discrepancies creeping in between APM1 and APM2
support again
13 years ago
Andrew Tridgell
13b2ddcbe1
dataflash: fixed APM2 flash logging
...
we had log wrap disabled on APM2, and also had the wrong log size. The
mainline code assumed 4096, but it is 8192 pages long.
13 years ago
Andrew Tridgell
02f25ac36d
libraries: rename purple to APM2
13 years ago