Commit Graph

33 Commits

Author SHA1 Message Date
Andrew Tridgell c35d1bd82e StorageManager: fixed startup crash
this crash was caused by AP_UAVCAN_DNA_Server declaring a storage
object on the stack, which meant file was not initialised to nullptr.
2023-03-12 07:15:01 +11:00
Andrew Tridgell 182ab996b1 StorageManager: support microSD for additional storage 2023-03-10 14:13:55 +11:00
Peter Barker 752c6c7dc5 StorageManager: change namespace of MultiCopter and FixedWing params
this stops the libraries knowing anything about AP_Vehicle
2022-11-09 19:04:37 +11:00
Jaaaky 6cae738ab8 StorageManager: fix write_block() comment 2021-12-17 09:53:47 +09:00
bugobliterator 6d07a512e9 StorageManager: fix storage manager counts and merge common areas 2021-11-10 19:03:59 +11:00
Andy Piper 50b90c2d2a StorageManager: convert APM_BUILD_COPTER_OR_HELI() to APM_BUILD_COPTER_OR_HELI 2021-10-26 11:42:12 +11:00
Gone4Dirt 0038b8edd7 StorageManager: Add APM_BUILD_Heli 2021-09-29 19:55:48 +10:00
Peter Barker e644a9dda8 StorageManager: add read_float and write_float 2021-06-06 11:41:30 +10:00
James Harton be3cc1b679 Docs: Change all references from dev.ardupilot.org to the appropriate documentation URLs. 2021-05-31 12:20:45 +10:00
Patrick José Pereira 45a819c98e StorageManager: 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 03a033c5c4 StorageManager: added support for 32k storage with param backup
when HAL_STORAGE_SIZE == 32768 then add:

 - 1280 more bytes for params
 - double waypoint space
 - add a parameter backup area
2021-01-16 06:47:10 +11:00
Andrew Tridgell 69d3264e55 StorageManager: allow for CANDNA storage on F405 boards
this allows for boards using the log structure storage with 15360
bytes of storage have a CANDNA area.

This fixes CAN support on F405 boards
2021-01-05 10:25:17 +11:00
Peter Barker 4647c6ef62 StorageManager: use pragmas to set storage layout rather than call
We don't need the flexibility to reset this, it's a waste of bytes and
something that could go wrong.  AP_Periph led the way with using
pragmas here.
2020-01-28 11:34:51 +11:00
Andrew Tridgell a733690f80 StorageManager: use hal.storage->erase() 2020-01-02 09:52:57 +11:00
Peter Barker 8469efc5aa StorageManager: use https:// scheme for ardupilot URLs 2019-12-10 07:53:46 +11:00
Siddharth Purohit 4034af6ef1 StorageManager: add storage aread for CAN Dynamic Node Alloc 2019-10-19 09:55:38 +11:00
Andrew Tridgell d005f066a9 StorageManager: enable use of a single storage region 2019-08-27 10:29:56 +10:00
Andrew Tridgell b983caa97e StorageManager: allow for 15k storage
this is for F4 boards using flash storage. They were using 8k, but can
actually fit 16k. This is optimised for lots of param space as we
expect to have a lot of customised params for OSD support
2018-06-24 08:26:28 +10:00
Andrew Tridgell ba32b06c59 StorageManager: fixed header order
fixes build for revomini HAL
2018-02-10 09:14:41 +11:00
Andrew Tridgell 9cce1e0733 StorageManager: expanded bind info to 56 bytes
cc2500 needs a larger bind area
2018-02-08 17:36:33 +11:00
Andrew Tridgell ac324a3760 StorageManager: added bind info storage area 2018-02-08 17:36:33 +11:00
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.
2016-10-24 09:42:01 -02:00
Andrew Tridgell ca39ece6cb StorageManager: added storage region for signing keys 2016-05-21 15:25:12 +10:00
Luis Vale Gonçalves 4e70665f17 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:39 -07:00
Lucas De Marchi 360855f109 StorageManager: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi bdf92e8c79 StorageManager: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Gustavo Jose de Sousa ce0cb248ce StorageManager: 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:25 +10:00
Gustavo Jose de Sousa 0d1d960899 StorageManager: remove unnecessary calculations on addr for next area
When writting or reading a block, if the block doesn't fit the area where it begins, the next base address is always zero. Thus the calculations to define the next value of addr are unnecessary.

Here's a quick validity proof using the previous calculations:
    First: Considering the case where the block doesn't fit it's first area:
        That means that (count + addr > length), what makes:
            count = length - addr; (1)
        So the following operations:
            addr += count;
            addr -= length;
        Are the same as doing:
            addr = addr + count - length; (2)
        Using (1) and (2) we have:
            addr = addr + length - addr - length = 0

    Second: When the block fits the area where it's at:
        That means that variable count is not changed,
        thus (n -= count) evaluates to 0, which makes the loop exit.

Another change was (b += count;) being moved after the condition to break the loop, since we just need to move the block pointer when it doesn't fit the first area.
2015-08-07 20:52:20 +10:00
Andrew Tridgell 81e6d88560 StorageManager: fixed hang in erase()
found by coverity
2015-06-20 15:00:57 +10:00
Andrew Tridgell 52cdd6394f StorageManager: cope with a wider range of storage sizes 2014-08-13 21:35:26 +10:00
Andrew Tridgell 66a21c4c33 StorageManager: first version of storage management library
used to divvy up eeprom/fram and allow for expandable storage
2014-08-13 18:29:04 +10:00