Commit Graph

30 Commits

Author SHA1 Message Date
Peter Barker 8f8493225c DataFlash: DFMessageWriter; ability to trickle messages out to DF 2015-09-03 09:54:55 +10:00
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.
2015-08-11 16:38:24 +10:00
Peter Barker 723c37bcf7 DataFlash: backend/frontend split 2015-06-26 16:02:50 +10:00
Andrew Tridgell 1e2214f8d1 DataFlash: fix for HAL_GPIO_* 2014-06-02 10:42:36 +10:00
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
2013-12-17 11:51:36 +11:00
Andrew Tridgell 97b7130bb9 libraries: update license header to GPLv3
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell 987cdaf3e1 DataFlash: make it safe to do DataFlash logging from timers
this uses a non-blocking semaphore take if we are in a timer
process. Useful for logging failsafe events
2013-03-02 17:42:06 +11:00
Andrew Tridgell 20825cc903 DataFlash: removed the byte and word based interfaces
simplifing ready for PX4 flash logging
2013-03-01 07:18:25 +11:00
Andrew Tridgell f683cff9e2 DataFlash: speed up SPI transfers in DataFlash_APM1 2013-01-13 19:26:43 +11:00
Andrew Tridgell 28a0ba6c4a DataFlash: added block based dataflash writes
these are about 10x faster than the old writes
2013-01-12 17:21:04 +11:00
Andrew Tridgell 44285cfbad DataFlash: fixed a semaphore bug in APM1 dataflash code 2013-01-08 14:37:39 -08:00
Pat Hickey 390e96311e DataFlash: change to new style Semaphore library 2013-01-03 13:48:07 -08:00
Andrew Tridgell fb4540a349 DataFlash: disable some debug code 2012-12-20 14:53:24 +11:00
Pat Hickey 4f07a90b2e DataFlash: apm1 fixups 2012-12-20 14:51:36 +11:00
Pat Hickey 0e5ff36c6c DataFlash: DataFlash_APM1 rewritten in terms of AP_HAL spi primitives 2012-12-20 14:51:36 +11:00
Pat Hickey cc699a2a4e DataFlash: conform to ordinary stdint types
* s/unsigned char/uint8_t/g
* changed all type 'byte' to uint8_t
2012-12-20 14:51:36 +11:00
Andrew Tridgell 17c115d2aa SITL: don't define __AVR_ATmega2560__ on desktop build
this allows us to properly separate the desktop build in the code
2012-11-19 09:03:35 +11:00
Jason Short c848fe18a5 APM1 Dataflash update
My data flash would never erase, this fixed it.
2012-11-09 22:15:16 -08:00
rmackay9 17afd075c1 DataFlash_APM1: use spi_semaphore to avoid conflicts with optical flow 2012-10-18 17:03:50 +09:00
uncrustify 21337a39d3 uncrustify libraries/DataFlash/DataFlash_APM1.cpp 2012-08-21 19:04:23 -07:00
rmackay9 2b24e422de DataFlash: revert delay callbacks to use "unsigned long" 2012-08-18 20:28:31 +09:00
rmackay9 20cb2e56a0 DataFlash: change "unsigned long" to "uint32_t" in callback functions 2012-08-18 19:22:14 +09:00
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
2012-07-04 12:42:46 +10:00
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
2012-05-22 19:29:02 -07:00
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
2011-12-28 16:00:48 +11:00
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
2011-12-26 19:17:11 +11:00
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.
2011-12-26 19:17:11 +11:00
Andrew Tridgell cba93dbd43 DataFlash_APM1: re-add defines lost from merge 2011-11-25 20:00:18 -08:00
Andrew Tridgell bb7af8c15a dataflash: fixed datatypes to be compatible with desktop build 2011-11-25 20:00:17 -08:00
Pat Hickey 82e7551c90 purple: rework DataFlash to separate purple and APM1 hardware support
the purple support is still a work in progress, but the APM1 support
should be fine
2011-11-25 20:00:16 -08:00