Commit Graph

10 Commits

Author SHA1 Message Date
Jean Cyr bf4558c31b Reduce data manager SD card wear and tear
When the data manager was first designed each file record contained a 2
byte header and an 126 byte data section, resulting in a record length
of 128 bytes. Along the way it was decided to add 2 spare bytes to the
record header, but regrettably the data section was not correspondingly
reduced in size so we end up with a record length of 130 bytes. This is
bad since it does not align with SD card flash sectors and results in
more erase/write flash cycles than necessary thus reducing the SD cards
life.

This update reduced the data section of the data manager to 124,
resulting in an optimal record length of 128 bytes.

In order to avoid the reuse of data previously written data in the old
format, which could result in catastrophic misinterpretation, the data
manager file is checked at startup. If it is found to be in the old
format, it is deleted and recreated with in the new record length. In
this case previously stored data is lost, but that is far safer than the
unpredictable result of using the old file.
2014-04-22 01:19:01 -04:00
Jean Cyr debb4f7021 Coding style
astyle according to http://pixhawk.org/dev/code_style
2014-03-23 01:35:13 -04:00
Jean Cyr 17c18947a4 Remove uneccesary dependencies and update credits 2014-03-23 01:05:06 -04:00
Jean Cyr b92b08ae62 Optimize and update data manager docs
Move repeated code to common function
Update missing and misleading comments
Fix data manager test compile errors
No functional changes
2014-02-02 00:42:15 -05:00
Julian Oes b10fa3d047 Waypoints/Navigator: Use two different dataman storage places, keep old waypoints until all new ones are written 2013-12-25 11:23:58 +01:00
Thomas Gubler 96debedcc8 prevent dataman from blocking startup when no sd card is present 2013-12-24 11:41:04 +01:00
Julian Oes 6a624abd7c Datamanager: Rename mavlink/offboard key 2013-12-16 17:13:17 +01:00
Julian Oes e8df08f139 Dataman: Also reserve space for onboard missions 2013-12-16 17:12:37 +01:00
Julian Oes e034f5135e Dataman: Some minor fixes 2013-12-03 16:25:46 +01:00
Jean Cyr 1cf9f72f62 Add data manager module and fence support to navigator
- Add function to geo.c to determine if global position is inside fence
- Add navigator support/commands for maintaining fence coords.
- Add data manager module to support persistence fence storage. Can
store other data, but only used for fence at this time.
- Add unit tests for data manager
2013-11-03 12:40:13 -05:00