1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

8238 Commits

Author SHA1 Message Date
Alessio Morale
4791f690ad OP-848 Move the handling of the UAVO configuration outside of the PiOS layer
a configuration helper header has been added to eliminate a lot of boilerplate code in *pios_board.c
2013-03-03 21:17:02 +01:00
Fredrik Arvidsson
e2e3089cf5 OP-864 Made OpenPilotGCS.xml the default configuration on first start. If this file is missing for some reason the selection dialog will appear. The configuration can also be set as a command line option. 2013-03-03 16:56:52 +01:00
Stacey Sheldon
990048cf29 ut: fix up unit test clean target name 2013-03-03 14:33:04 +01:00
Oleg Semyonov
776ec4f3ea ut_logfs: do not pollute the source tree with temp files 2013-03-03 14:33:04 +01:00
Oleg Semyonov
c038f6b987 ut_logfs: fix fseek()/fread() problem on Windows 2013-03-03 14:33:04 +01:00
Oleg Semyonov
14db5c80f1 ut: change xml output directory to make Bamboo a bit happier 2013-03-03 14:33:04 +01:00
Oleg Semyonov
8901cde35b ut: remove unused targets 2013-03-03 14:33:04 +01:00
Stacey Sheldon
67de4f0e0c ut: drop dependency on C++0x 2013-03-03 14:33:04 +01:00
Stacey Sheldon
b3178c3966 flash_ut: fix forward declaration of init function 2013-03-03 14:33:04 +01:00
Stacey Sheldon
ea09a53adc unittest: build gtest-all and gtest_main directly
Conflicts:
	make/unittest.mk
2013-03-03 14:33:03 +01:00
Stacey Sheldon
9b94eeb745 ut: convert logfs unit test to gtest
Conflicts:
	Makefile
	make/unittest.mk
2013-03-03 14:33:03 +01:00
Stacey Sheldon
fb4a1d7b1b gtest: stop compiling gtest libraries on installation 2013-03-03 14:33:03 +01:00
Stacey Sheldon
14c5af6148 ut: convert make rules to template and add TAP file generation
Make targets changed to:
 make ut_<test>
 make ut_<test>_tap
 make ut_<test>_run
 make ut_<test>_clean
 make all_ut
 make all_ut_tap
 make all_ut_run
 make all_ut_clean

Conflicts:
	Makefile
2013-03-03 14:33:03 +01:00
Stacey Sheldon
06f805b00e ut: add googletest (gtest) install rules
See: http://code.google.com/p/googletest/
2013-03-03 14:33:03 +01:00
Stacey Sheldon
264d76382b makefile: allow arch-specific path to qmake
This will be required once we move to Qt5.
2013-03-03 14:33:03 +01:00
Stacey Sheldon
e00372a540 makefile: define ARCH before including make/tools.mk
ARCH is required in order to pick up the right versions
of the tools for each architecture.
2013-03-03 14:33:03 +01:00
Stacey Sheldon
f934ebfd4c makefile: ensure that the builds are not run as root
When running the build as root, any bugs in the Makefiles
can have disasterous results.  This will be even more
important once we start automatically running unit tests
as part of our build.

This change ensures that the builds cannot be run as root.
2013-03-03 14:33:03 +01:00
Stacey Sheldon
e05ec8ed27 ut: drop dependency on C++0x
Conflicts:
	make/unittest.mk
2013-03-03 14:33:03 +01:00
Stacey Sheldon
842b275e13 logfs: fix bugs in handling full filesystem conditions
This was caught by the logfs unit tests.
2013-03-03 14:33:02 +01:00
Stacey Sheldon
b211840104 logfs: allow loading zero length files
This was found by the logfs unit tests.

This may be useful if we want to use empty files as existence
flags in the future.  Doesn't make any sense for UAVOs but
is valid in the general sense of a filesystem.
2013-03-03 14:33:02 +01:00
Stacey Sheldon
b6eeb59b26 flash: verify JEDEC ID during flash init
Verify that the flash component on the board matches exactly
what we're expecting.  This is a simple way to verify that we
are communicating properly with the JEDEC flash chip.

Conflicts:
	flight/targets/board_hw_defs/freedom/board_hw_defs.c
	flight/targets/board_hw_defs/quanton/board_hw_defs.c
2013-03-03 14:33:02 +01:00
Stacey Sheldon
17b8696261 flash: use uintptr_t to hold opaque pointers
When storing an opaque pointer value in a uint, the
appropriate type is uintptr_t which is guaranteed to
be wide enough to hold a pointer.

This is particularly important when the code can be
compiled in a sim or unit test environment which is
intended to run on a 64-bit machine.

Conflicts:
	flight/PiOS/Common/pios_flash_jedec.c
	flight/targets/DiscoveryF4/System/pios_board.c
	flight/targets/FlyingF4/System/pios_board.c
	flight/targets/Freedom/System/pios_board.c
	flight/targets/Quanton/System/pios_board.c
2013-03-03 14:33:02 +01:00
Stacey Sheldon
dd5f4b949c logfs: use uintptr_t to hold opaque pointers
When storing an opaque pointer value in a uint, the
appropriate type is uintptr_t which is guaranteed to
be wide enough to hold a pointer.

This is particularly important when the code can be
compiled in a sim or unit test environment which is
intended to run on a 64-bit machine.

Conflicts:
	flight/targets/DiscoveryF4/System/pios_board.c
	flight/targets/FlyingF4/System/pios_board.c
	flight/targets/Freedom/System/pios_board.c
	flight/targets/Quanton/System/pios_board.c
2013-03-03 14:33:02 +01:00
Stacey Sheldon
60c06b8c4b ut: add unit test build infrastructure
New build targets:
  make ut_all
  make ut_clean

to build (or clean) all unit tests.
2013-03-03 14:33:02 +01:00
Alessio Morale
cc2d5f8eae Fixes for missing openpilot.h include, previously coming from flashfs_objlist 2013-03-03 14:33:02 +01:00
Stacey Sheldon
7f53aa422a ut: add basic unit test for logfs
Build it with:
  make ut_logfs

Create a raw flash file like this:
  dd if=/dev/zero bs=1 count=2MiB | tr '\000' '\377' > theflash.bin

Run it with:
  ./build/unit_tests/logfs/logfs.elf && echo 'all good'

Conflicts:
	Makefile
2013-03-03 14:33:02 +01:00
Stacey Sheldon
7726b9e2a9 logfs: use f3-safe slot and arena states for all chips
Filesystem magic value has been updated to deal with the
format change.

Conflicts:
	flight/targets/board_hw_defs/discoveryf4/board_hw_defs.c
	flight/targets/board_hw_defs/flyingf4/board_hw_defs.c
	flight/targets/board_hw_defs/freedom/board_hw_defs.c
	flight/targets/board_hw_defs/quanton/board_hw_defs.c
2013-03-03 14:33:01 +01:00
lilvinz
d611207789 pios_flashfs_logfs: moved modified ARENA and SLOT enums to an F3 branch
also added a detailed comment
2013-03-03 14:33:01 +01:00
lilvinz
b242f8b88c pios_flashfs: adapted flashfs to work on f3 2013-03-03 14:33:01 +01:00
Stacey Sheldon
81059c41f7 flashfs: remove API dependency on uavobjmanager types
The flashfs layer is now entirely decoupled from the UAVO
data types.  All UAVO related calls are now properly
contained within uavobjectmanager.c.

This will make the flashfs layer more portable as well as
more testable in a standalone environment.  Eventually,
this layer could be used to store arbitrary files.

Also fixed all of the doxygen headers for the flashfs API.
2013-03-03 14:33:01 +01:00
Stacey Sheldon
d2a3f254bc stmflash: add flash driver for internal flash in STM32 2013-03-03 14:33:01 +01:00
Stacey Sheldon
d89a9b1b6c objlist: remove now unused objlist flash filesystem
Conflicts:
	flight/PiOS/inc/pios_flashfs_objlist.h
2013-03-03 14:33:01 +01:00
Stacey Sheldon
bcb66764e2 logfs: use logfs on all targets that have serial flash
Conflicts:
	flight/targets/FlyingF4/Makefile
	flight/targets/FlyingF4/System/pios_board.c
	flight/targets/Freedom/Makefile
	flight/targets/Freedom/System/pios_board.c
	flight/targets/Quanton/Makefile
	flight/targets/Quanton/System/pios_board.c
	flight/targets/board_hw_defs/flyingf4/board_hw_defs.c
	flight/targets/board_hw_defs/freedom/board_hw_defs.c
	flight/targets/board_hw_defs/quanton/board_hw_defs.c
2013-03-03 14:33:01 +01:00
Stacey Sheldon
5ef0988137 logfs+flash: add log structured filesystem for PiOS
A new flash driver abstraction is also provided to allow
for future support of other types of flash device under
the filesystem.

Conflicts:
	flight/PiOS/Common/pios_flash_jedec.c
2013-03-03 14:33:01 +01:00
Stacey Sheldon
20921e48ca flashfs: define the API to the FLASHFS subsystem 2013-03-03 14:33:01 +01:00
Fredrik Arvidsson
9e870e6ae3 OP-856 Added enabling/disabling of required modules depending on port configuration. Added rules for port configuration. 2013-03-03 14:17:37 +01:00
Alessio Morale
d26aaa6f6d sim_posix Removed unused files 2013-03-03 09:50:20 +01:00
Alessio Morale
5fdaccc1fa sim_posix: unified inc files with the rest of PiOS .h, some dir moves/cleanup, fixed some compilation issues. 2013-03-03 09:50:20 +01:00
Kevin Vertucio
4c95e5c613 fixed indentation
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
2013-03-01 09:13:32 -05:00
Kevin Vertucio
e4d516424e fixed indentation and clean up formatting
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
2013-03-01 09:10:26 -05:00
Kevin Vertucio
c07142fa53 fixed some grammatical errors and formatting
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
2013-03-01 08:59:02 -05:00
Kevin Vertucio
8a59b5c07a clean up formatting from review comments
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
2013-03-01 08:53:04 -05:00
Fredrik Arvidsson
1b5a54334c Merge branch 'next' into thread/OP-856_Revolution_HW_Settings 2013-02-28 08:16:32 +01:00
Fredrik Arvidsson
de026a13fc OP-856 Basic implementation of hardware settings page. 2013-02-28 08:13:21 +01:00
David Willis
70294ed1ad Revert last change that broke compatibility with 12.10.2 2013-02-27 21:18:23 +00:00
David Willis
dec828f9ab Update git version of last UAVObject definition change 2013-02-27 00:12:11 +00:00
David Willis
7a4fcba285 Merge branch 'next' into dwillis/OP-792
Conflicts:
	shared/uavobjectdefinition/manualcontrolsettings.xml

Merge next
2013-02-26 23:57:06 +00:00
Fredrik Arvidsson
e710f3bb91 OP-856 Basic renaming from PRO to Revolution 2013-02-26 07:37:14 +01:00
Philippe Renon
ed83f282a5 OP-834 home location related error reporting improvments and comment
cleanups
2013-02-23 18:35:07 +01:00
Philippe Renon
8bd3c09860 OP-834 fixed bad Q_ASSERT around effective code 2013-02-23 18:35:07 +01:00