Commit Graph

18 Commits

Author SHA1 Message Date
Lucas De Marchi 88dc17fe6e AP_HAL_Linux: Storage: fix initialization
Use init() to lazily create/open storage directory and keep fd open
afterwards. This avoids duplicate code opening the storage in several
places.
2018-05-24 08:00:33 -07:00
Andrew Tridgell 26161ee467 HAL_Linux: Storage::_timer_tick is an override 2018-02-07 20:33:45 +11:00
Lucas De Marchi f36e8d9c05 AP_HAL_Linux: remove AP_HAL_Linux_Namespace header
This centralized namespace header encourages centralizing things on
umbrella headers that are a pain to maintain. Force each part of
AP_HAL_Linux to include what is used.

While at it, do some whitespace cleanups and minor changes to adhere to
coding style.
2016-07-29 20:25:03 -03:00
Lucas De Marchi 8681d23cbd AP_HAL_Linux: remove unused Dataflash
This is selectable by a define and is never changed. Just remove
everything referencing it: we can come up with a better solution if it
is actually used later.
2016-07-29 14:47:04 -03:00
Lucas De Marchi 705393b30c AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Lucas De Marchi 0817fe6033 AP_HAL_Linux: default USE_FRAM to 0 for all boards
This disables FRAM usage in PXF and erleboard. The reason is it's
failing and not being used. Right now we get this on startup:

	root@beaglebone:~# ./ArduCopter.elf
	FRAM: Online
	Storage: FRAM is getting reset to default values
	Failed to read FRAM

Testing with valgrind also reveals some invalid memory reads. Let's
disable it for now to be common with other boards.
2016-01-11 15:44:24 -02:00
Lucas De Marchi 2439826c19 AP_HAL_Linux: use init() method without arguments
Override the init() method from parent class that doesn't have a
parameter since it's not used here.
2015-12-02 14:49:11 -02:00
Lucas De Marchi 2ac96b942c AP_HAL_Linux: remove prefix from AP_HAL_Linux classes
We have already a Linux namespace, so there's no need to prefix Linux on
all names.
2015-10-21 10:11:19 +11:00
Lucas De Marchi 54c2c5f682 AP_HAL_Linux: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +10:00
Víctor Mayoral Vilches 728921f7c5 AP_HAL_Linux: ERLEBOARD legacy support
This config referred to the legacy Erle-Board
https://erlerobotics.com/blog/product/erle-board/
The configuration is preserved to support the
existing boards.
2015-09-09 10:31:55 +10:00
Gustavo Jose de Sousa 124b750c10 AP_HAL_Linux: 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:28:43 +10:00
Gustavo Jose de Sousa 87776d8a4b Storage: define LINUX_STORAGE_SIZE correctly
The value for LINUX_STORAGE_SIZE was defined inconsistently against the one
defined for Linux boards in HAL_STORAGE_SIZE. That led to some values not
being written to the storage when running the test binary built at
libraries/StorageManager/examples/StorageTest.
2015-06-30 16:37:08 +10:00
bugobliterator dd6d520385 HAL_Linux:Create subclass to handle FRAM Storage under main Storage Class 2014-11-08 11:36:09 +11:00
Andrew Tridgell b40bd479c4 HAL_Linux: moved FRAM vs FS choice into HAL_Linux headers 2014-08-19 10:08:17 +10:00
bugobliterator 4b2f7cd163 HAL_Linux: Add FRAM HAL driver support for non-volatile storage
Support for File System starage mode is retained, appropriate Storage
mode can be set by defining USE_FS_STORAGE for File System storage
aand US_FRAM_STORAGE for FRAM storage.  Note: FS storage and FRAM
storage are never synced as of now.
2014-08-19 10:08:16 +10:00
Andrew Tridgell d40d0f6aec AP_HAL: removed old storage type read/write functions
not needed any more
2014-08-13 18:46:44 +10:00
Andrew Tridgell bcf4f48e65 HAL_Linux: switched to pthread based scheduling 2013-09-28 21:24:02 +10:00
Andrew Tridgell 4ba044c441 AP_HAL_Linux: initial Linux AP_HAL 2013-09-28 21:24:01 +10:00