Commit Graph

84 Commits

Author SHA1 Message Date
José Roberto de Souza 2f2e3a7e7c modules: dataman: ram_flash: No need to write/erase data that do not need to persist
Just update in RAM is enough.
2017-07-13 15:21:26 +02:00
José Roberto de Souza 10f54e718e modules: dataman: Optimize memory usage
Use the size of each item type instead of the biggest one.

In AeroFC that runs is constrained mode it was using 7860 bytes
and now it uses 6930 bytes almost 1KB less.
2017-07-13 15:21:26 +02:00
José Roberto de Souza e2aae04c95 modules: dataman: Add a ram_flash backend
This backend will keep all updated data in RAM and
persist the data between reboots using flash memory.

Using only flash memory would result in a slow backend that
would decrease the lifetime of the flash memory, using both
we can reduce the several cycles of erase & write into flash
and keep the performance of the backend almost as fast
as the RAM only backend.

Note: Do not use this backend on a sector from the same flash memory
bank as the memory bank that STM32 read instructions or it can block
the CPU from fetching instructions from flash during the erase and
write operations and cause your drone crash.
2017-03-10 11:31:07 +01:00
José Roberto de Souza a2670bdbc8 modules: dataman: Move backend specific out of main routines 2017-03-10 11:31:07 +01:00
José Roberto de Souza 66d9d56525 modules: dataman: Share memory between backends
Also having just a boolean to track if backend is running.
2017-03-10 11:31:07 +01:00
Julian Oes 8c1e85a65f dataman: don't wrap around at 256
The dataman started overwriting contents after 256 items because the
item index were only uint8_t. This fix allows for more than 256
waypoints.
2017-02-15 22:29:24 -05:00
wangxdflight b693e29d64 enable px4 flight for excelsior(legacy) 2017-01-16 08:25:58 -08:00
Daniel Agar 751909cd4e clang readability-braces-around-statements (#6298) 2017-01-11 17:01:51 -05:00
Daniel Agar b4da337cd4 test coverage cleanup
- dataman clean exit code
 - unit test proper cleanup
 - add some level of simulated sensors for tests
 - delete unused test/standard_vtol
2017-01-03 04:00:41 -05:00
Lorenz Meier 78f00368c5 Dataman: Be less verbose on start to clutter shell output less 2017-01-01 13:59:41 +01:00
Lorenz Meier f72b439fd5 Dataman: Header cleanup 2016-12-27 21:00:51 +01:00
David Sidrane c9f10107c0 Nuttx Upgrade:Adds sem_setprotocol 2016-12-21 08:34:21 +01:00
Lorenz Meier 5ddd69c872 Dataman: Make versioning define more explicit 2016-10-23 16:26:03 +02:00
Lorenz Meier c7cdef2a4b Clarify version flag for dataman 2016-10-23 16:26:03 +02:00
Lorenz Meier 0a4fedd778 Dataman: Use single method to infer file compatibility 2016-10-23 16:26:03 +02:00
Lorenz Meier 9e7d5f088e dataman: Ensure compat field is set and read correctly 2016-10-23 16:26:03 +02:00
Lorenz Meier ff0d7613b1 Add manual seed to dataman hash to allow later incrementing the seed number for incompatible changes 2016-10-23 16:26:03 +02:00
Lorenz Meier db774798fa Dataman: Store sizes of all containers and reset file if any of them changes. 2016-10-23 16:26:03 +02:00
Lorenz Meier c2285c84a9 Dataman: Do nnot pack structs to avoid reading back wrong values on existing systems 2016-10-18 00:26:40 +02:00
David Sidrane ecbe8c2179 Packed union to save more space 2016-10-18 00:23:58 +02:00
David Sidrane b2bf9e15eb Use union of datatypes supported by dataman to reduce wasted space 2016-10-18 00:23:58 +02:00
David Sidrane 44b5b52bcb Add suport for Memory Constrained systems 2016-10-18 00:23:58 +02:00
David Sidrane 24e20b2cec Changed public interface comments to Doxyagen style 2016-10-18 00:23:58 +02:00
David Sidrane dce2262243 Add in RAM storage to dataman 2016-10-18 00:23:58 +02:00
Julian Oes 8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Julian Oes a39124a10d dataman: make it less chatty
- Removed a couple of unneeded printfs.
- On POSIX it shouldn't warn if it's not a multiple of the
  block size.
2016-06-07 22:10:56 +02:00
Julian Oes 3a8d242576 dataman: get path for Snapdragon right 2016-05-14 11:21:44 +02:00
James Goppert 967e4dd127 Modified cmake to use STACK_MAX and STACK_MAIN 2016-04-14 13:36:36 -04:00
Lorenz Meier 6e8f563d27 dataman: Do not reset mission file on each reboot 2016-02-11 18:40:18 +01:00
Lorenz Meier b6c4501d0e Adjust data size of dataman to force reset of all existing user data 2015-12-02 09:15:37 +01:00
Lorenz Meier a0bfd3a5bf Dataman: Remove excessive stack allocation 2015-10-10 22:23:34 +02:00
Lorenz Meier 228cc8844e Dataman: Lower scheduling priority 2015-10-10 16:02:29 +02:00
Lorenz Meier 73fabc2b4d dataman: Limit variable scope 2015-10-07 16:30:24 +02:00
Lorenz Meier fa5071b3c5 Remove module.mk files to prevent confusion of adopters upgrading 2015-10-06 11:23:20 +02:00
Lorenz Meier fa27e59ac4 dataman: Move to semaphore abstraction 2015-09-20 00:28:39 +02:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Lorenz Meier d18d43b0da dataman: fix code style 2015-09-05 22:16:38 +02:00
Lorenz Meier cb7a4f5799 dataman: Adjust to uORB mission changes 2015-08-20 11:07:53 +02:00
Lorenz Meier 10a77a1513 Dataman: Be more verbose on error 2015-07-05 13:46:24 +02:00
Lorenz Meier 454becdae5 Merged release_v1.0.0 branch into master 2015-06-25 21:45:17 +02:00
Lorenz Meier 1c82f73822 Dataman: Reduce excessive stack allocation 2015-06-22 22:15:45 +02:00
Mark Charlebois 872a26e6da Fixed passed ot open() for O_CREAT
In nuttx the mode parameter to open is not required but in Linux,
and per the POSIX spec, mode is required if the O_CREAT flag is
passed.

The mode flags are different for NuttX and Linux so a new set of
PX4 defines was added:

PX4_O_MODE_777 - read, write, execute for user, group and other
PX4_O_MODE_666 - read, and write for user, group and other
PX4_O_MODE_600 - read, and write for user

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-14 11:26:40 +02:00
Mark Charlebois 4d1ae6269b POSIX: Added PX4_ROOTFSDIR to file paths
Set a default path relative to current dir for the posix target.

Running make posixrun will create the required directoroes and then run
mainapp from its build location.

PX4_ROOTFSDIR is set to nothing for nuttx.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 21:36:13 -07:00
Lorenz Meier f5ce8e4826 Update dataman to reflect topic updates 2015-05-27 15:21:31 -07:00
Lorenz Meier 68d723e26c dataman: add missing include of px4_defines header 2015-05-27 21:10:48 +02:00
Lorenz Meier 4565f57468 Merged release_v1.0.0 into master 2015-05-27 15:28:41 -07:00
Mark Charlebois cb5db8ec83 dataman: Fixed file permissions on file creation
In Linux the file was being created with incorrect permissions.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 10:37:15 -07:00
Mark Charlebois 05720b5aef Added ability to set OS specific path for dataman file
dataman can now be started using:

dataman start -f filepath

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 09:24:48 -07:00
Mark Charlebois eed2479dfc Added px4_ prefix to task_spawn_cmd
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:20:08 -07:00
Mark Charlebois 190814bc97 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/drivers/rgbled/rgbled.cpp
	src/modules/commander/PreflightCheck.cpp
	src/modules/commander/airspeed_calibration.cpp
	src/modules/commander/calibration_routines.cpp
	src/modules/commander/gyro_calibration.cpp
	src/modules/commander/mag_calibration.cpp
	src/modules/mc_att_control/mc_att_control_main.cpp
2015-04-28 11:48:26 -07:00