Commit Graph

142 Commits

Author SHA1 Message Date
Lorenz Meier 27e4139540 UAVCAN fix compile warning on signedness 2015-08-24 10:20:40 +02:00
Lorenz Meier 21d1b4ba2e Merged beta into master 2015-08-22 14:06:01 +02:00
Pavel Kirienko f371ece43b UAVCAN_ENABLE defaults to 0 2015-08-22 13:54:57 +02:00
Pavel Kirienko e1f33871ef UAVCAN enabled by default 2015-08-22 13:54:57 +02:00
Pavel Kirienko 6864779fa6 Multiple stages for UAVCAN_ENABLE 2015-08-22 13:54:56 +02:00
Pavel Kirienko 3860dbdc8c UAVCAN Barometer driver fix - reporting temperature in Celsius degrees, not in Kelvin 2015-08-22 13:54:56 +02:00
Pavel Kirienko 473d321af8 UAVCAN Magnetometer driver update - no logical changes 2015-08-22 13:54:56 +02:00
Pavel Kirienko 36f91d30eb Fixes pure virtual call exception in VirtualCanDriver<>::handleRxFrame()
Stack trace:
Thread [1] (Suspended: Breakpoint hit.)
        12 __cxa_pure_virtual() libxx_cxapurevirtual.cxx:66 0x0808ca42
        11 notifyRxFrameListener() uc_dispatcher.cpp:216 0x080787ce
        10 uavcan::Dispatcher::spinOnce() uc_dispatcher.cpp:276 0x080787ce
        9 uavcan::Scheduler::spinOnce() uc_scheduler.cpp:196 0x0807b4e0
        8 spinOnce() abstract_node.hpp:88 0x080659fc
        7 spinOnce() node.hpp:132 0x080659fc
        6 UavcanNode::node_spin_once() uavcan_main.cpp:428 0x080659fc
        5 UavcanNode::run() uavcan_main.cpp:542 0x08065e74
        4 operator() uavcan_main.cpp:343 0x0806626a
        3 UavcanNode::__lambda0::_FUN() uavcan_main.cpp:343 0x0806626a
        2 task_start() task_start.c:138 0x08087720
        1 <symbol is not available> 0x00000000
2015-08-15 09:53:13 +03:00
Pavel Kirienko aa412aaced UAVCAN servers: proper handling of startup failure, more verbose error reporting 2015-08-15 09:42:16 +03:00
Mark Charlebois a589d15c52 Refactored debug() and log() in CDev
These functions used vprintf which is not available on all platforms.
They also do not enable line and file debug output.

Changed to macros that preserve the output format.  Uses new macro that
can be used to implement per object, runtime selectable logging

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-11 12:07:06 -07:00
David Sidrane 22d46fa733 Merged master_uavcan_modular src/modules/uavcan/ 2015-07-09 11:22:35 -10:00
David Sidrane 3e64ad10e8 Conditional inclusion of the Node Allocation and FW Server - default is OFF 2015-06-17 19:43:06 +02:00
David Sidrane d6c2dd997b Conditional inclusion of the Node Allocation and FW Server - default is OFF 2015-06-17 06:21:28 -10:00
Lorenz Meier c9fefe236b Merged release into master 2015-06-13 11:06:01 +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
David Sidrane 68276ff345 Back Port from Master - Changes to build on latest uavcan master with FW upload and Node ID 2015-06-05 06:43:10 -10:00
David Sidrane 2d796f408d Ran Astyle 2015-06-04 03:27:40 -10:00
David Sidrane 6155a1557f Changes to build on latest uavcan master with FW upload and Node ID allocation 2015-06-04 02:37:59 -10:00
Lorenz Meier e07731de7a Move esc_status to generated topics 2015-05-27 15:21:31 -07:00
Lorenz Meier b980e34c3c Update uavcan app for generated actuator_outputs topic 2015-05-27 15:21:31 -07:00
Lorenz Meier 4565f57468 Merged release_v1.0.0 into master 2015-05-27 15:28:41 -07:00
Mark Charlebois 31923c3add On more fixup for orb_advert_t changed to void *
Reviewed all changes in pull request and made sure all cpp files
check orb_advert_t types against nullptr and c files check against
NULL.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois 1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois a734fc96d1 extensive orb_advert_t fixes
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.

The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.

Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Ban Siesta 21dfd0243d drivers: use new ringbuffer namespace everywhere 2015-05-24 10:04:38 +01:00
Lorenz Meier 8fd00f4d6d Merged release_v1.0.0 into master 2015-05-23 11:07:10 +02:00
Lorenz Meier 6d7e063148 Added GIT version which recompiles on each build 2015-05-23 09:59:46 +02:00
Mark Charlebois c5237f7f6f Removed extra abstracton layer in systemlib
The calls to task_spawn_cmd, kill_all, and systemreset  were wrappers
around the px4_{task_spawn_cmd|kill_all|systemreset} implementations.

Removed the wrappers and changed all calls to the px4_ equivalents.

NuttX specific code was moved into px4_tasks.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:43:11 -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
Pavel Kirienko 3f961bf3c6 UAVCAN driver silently ignores repeated start commands without error. This allows to avoid error messages when UAVCAN driver is started from extras script before default initialization sequence is executed. 2015-04-23 22:02:34 +03:00
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Mark Charlebois bf429188b4 Reverted: Use OS independent API for task creation/deletion
Keep existing API use in code. Bind the use of the OS independent
implementation in the systemlib layer.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Mark Charlebois ddb32742eb Use OS independent API for task creation/deletion
Calls to task_delete and task_spawn_cmd are now
px4_task_delete and px4_task_spawn_cmd respectively.

The px4_tasks.h header was added to the affected files
and incusions of nuttx/config.h were removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Daniel Agar 207b57869d only define GIT_VERSION where it's used
-when the git revision is passed to every file as a define it causes
unnecessary ccache cache misses
2015-04-18 01:25:54 -04:00
Lorenz Meier bb9e5d0d4c Merge pull request #2039 from PX4/fix_uavcan_deps
Fixes dependency not being cleaned by keeping the uavcan artifacts in th...
2015-04-16 20:06:53 +02:00
Roman Bapst 555e96a37a fixed publication of mixer limit flags 2015-04-10 20:26:38 +02:00
Andrew Tridgell a4bece7595 uavcan-baro: use RingBuffer for read() support 2015-04-04 10:20:51 +02:00
Holger Steinhaus d06761bba8 uavcan-baro: add read()-style interface to baro device 2015-04-04 10:20:38 +02:00
Daniel Agar 8aae66b893 trivial code style cleanup round 2 2015-03-27 23:38:58 -04:00
David Sidrane 7be4298ba1 Fixes dependency not being cleaned by keeping the uavcan artifacts in the BUILD_DIR 2015-03-25 08:11:32 -10:00
Lorenz Meier 1a91c7da79 UAVCAN: Move to 0-based indices 2015-02-09 22:56:23 +01:00
Thomas Gubler 84ff3c671d Merge remote-tracking branch 'upstream/master' into ros_messagelayer_merge2_attctrl_posctrl
Conflicts:
	src/drivers/px4fmu/fmu.cpp
2015-02-01 11:06:47 +01:00
Pavel Kirienko 2f7a9eaf65 Fix for a compilation failure 2015-01-29 16:33:53 +01:00
Lorenz Meier 1cc4c808a8 Upgrade UAVCAN to multi pub/sub A API 2015-01-29 16:33:53 +01:00
Thomas Gubler 66007d56ef fix uorb constants in uavcan module 2015-01-28 16:32:54 +01:00
Lorenz Meier 7faef870c8 Fix UAVCAN dependency generation issue 2015-01-22 09:24:13 +01:00
Pavel Kirienko ae0e2d7209 Removing extra UAVCAN perfcounters 2015-01-21 14:54:24 +01:00
Pavel Kirienko 4baf4a032f Fixed: Passing this->_armed_sub to close, which cannot accept a negative number. 2015-01-21 14:54:24 +01:00
Pavel Kirienko 91362223ea Fixed uninitialized fields of UavcanNode 2015-01-21 14:54:24 +01:00
Pavel Kirienko 2ebd7099de Globally configurable stack checks, R10 is always fixed 2015-01-21 14:54:24 +01:00