Commit Graph

805 Commits

Author SHA1 Message Date
Mark Charlebois 1f84c348fc fix for segv if topic has not been published
If the topic has not been published, orb_copy returns a
negative number which causes update() to memset the data
contents to zero.

In some instances data is a null pointer. This causes a
segment violation crash.

Added a check for data != 0

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 1b4b8bb856 Linux: in printf cast uint64_t to unsigned long long
When printing a uint64_t type using %llu, this works on a 32bit
system, but on a 64bit machine uint64_t is an unsigned long.

The compiler complains about unmatching types.

The time times in PX4 should likely have been unsigned long long
and not uint64_t as that type changes per architecture.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 62eb403e4d Linus: print format fixes to build with clang on IFC6410
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 90818363eb Linux: fix for undefined BO in mavlink_main_linux.cpp
if termios.h is included before mathlib.h then BO is undefined.
Since mathlib.h is not needed it was removed but I still don't
know why this error occurs.

Also added -lrt to link flags for clock_gettime

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 2feeecdab1 Linux: Added config and stubs to compile I2C device for Linux
Not yet functional. Full implementation will provide an IOCTL interface to
do bi-directional transfer. will model the interface after Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois ac0df5c61d Linux: added HRT test, moved tests to linux/tests
Also fixed naming of mavlink files for NuttX build.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois d013ac0927 Support for building more modules with Linux
Added more queue support to linux/px4_layer.

Use virt char devices for ms5611, and mavlink.

Added more HRT functionality. uORB latency test
now fails. Likely due to bad HRT impl for Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07: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
Lorenz Meier d8c91b9fbd MAVLink app: Be less verbose 2015-04-20 09:14:13 +02:00
Don Gagne 05c351183f Parameter meta data fixes 2015-04-15 11:29:37 -07:00
M.H.Kabir 66e6938c6d timesync: Add uORB topic, general fixes 2015-04-14 13:14:15 +05:30
Lorenz Meier 79f6459740 mavlink app: Code style fix 2015-04-09 19:35:14 +02:00
philipoe 309a767c06 mavlink: Allow mavlink_send to take component_ID into account. Still use a default argument in case the user does not supply a component_ID 2015-04-09 19:12:38 +02:00
Matt Beall fa9f7075fa Changed message staging 2015-03-31 10:52:26 -06:00
Matt Beall ce9f46d4e7 Added ping message handling to mavlink receiver 2015-03-31 10:30:57 -06:00
Lorenz Meier a184aebf0f mavlink: Crank up param transmission rate 2015-03-28 13:54:19 -07:00
Lorenz Meier 78741c87e5 MAVLink app: 1) only transmit active params, 2) send params faster, 3) ensure no overflow occurs on buffer when sending at higher rate. 2015-03-28 13:07:01 -07:00
Lorenz Meier fe12bffefa param subsystem: Only send the instantiated parameters via telemetry 2015-03-28 13:07:01 -07:00
Daniel Agar 8aae66b893 trivial code style cleanup round 2 2015-03-27 23:38:58 -04:00
Daniel Agar c2abb0f82a fix code style if trivial one line difference 2015-03-19 23:49:36 +01:00
Lorenz Meier ba0a343090 MAVLink app: Adjust stack size of receiver thread 2015-03-08 08:14:58 +01:00
Lorenz Meier 61437a5587 MAVLink app: Do no allocate memory statically, but only on execution on stack. 2015-03-08 07:49:00 +01:00
Lorenz Meier 0261f5dfbe MAVLink: Reduce stack usage 2015-03-03 17:30:34 +01:00
Lorenz Meier 1d90e86ec4 Commander and MAVLink: Adjust stack sizes as required 2015-03-03 17:29:49 +01:00
Lorenz Meier 0ebbb5f533 MAVLink: Use less RAM 2015-03-01 18:32:07 +01:00
Thomas Gubler 7fb82e74c8 tiny comment improvement 2015-02-28 18:39:36 +01:00
Matt Beall 0f51907dd6 Check if offboard mode was activated before publishing controls 2015-02-28 15:19:16 +01:00
Matt Beall 220fb19eb7 Removed actuator_control_mode flags...Using pre-existing flags instead 2015-02-28 15:19:16 +01:00
Matt Beall b0e878dbae Compiler error 2015-02-28 15:19:16 +01:00
Matt Beall b8aa79cae4 Made changes to have actuator controls mirror other syntax more closely 2015-02-28 15:19:16 +01:00
Matt Beall 7d6723aa2d small change 2015-02-28 15:19:16 +01:00
Matt Beall fd4fd4eaaa Set the actuator control flag in receiver 2015-02-28 15:19:16 +01:00
Matt Beall e2de72b882 Added offboard actuator controls flags to offboard control mode and vehicle control mode to disable controls in att_control apps 2015-02-28 15:19:16 +01:00
Matt Beall 5e199b3984 Set ignore flags to true 2015-02-28 15:19:16 +01:00
Matt Beall 40ae0ebdac Set up to receive mavlink actuator control messages and publish to uorb 2015-02-28 15:19:16 +01:00
Thomas Gubler ee6dc51ef2 improve offboard attitude setpoint handling 2015-02-28 15:19:15 +01:00
Thomas Gubler ed16bd6fc6 mavlinkreceiver: set att target: remove memset 2015-02-28 15:19:15 +01:00
Thomas Gubler 0389d30e0e offboard attitude sp: handle thrust only messages
if attitude/rates haven been used previously do not set the ignore flags
even if the message asks us to do so to keep the controllers running
2015-02-28 15:19:15 +01:00
Thomas Gubler 3d29fa5f4e mavlink receiver: fix indentation 2015-02-28 15:19:15 +01:00
Thomas Gubler 2b2f7e9407 introduce offboard control mode topic
Replace offboard_control_setpoint with offboard_control_mode
Remove all setpoint data from the topic as it's  not used anymore
(setpoint data is directly routed into position/attitude setpoint topics
for some time now)
Remove mode enum and replace with ignore booleans which map better to
the mavlink message
Mavlink: Rework parsing of offboard setpoints
Commander: in offboard mode set control flags based on ignore flags
instead of enum
2015-02-28 15:19:15 +01:00
Ziyang LI 63fd54f44e fixed 'NaN' yaw setpoint in offboard mode 2015-02-17 09:29:29 +01:00
Atsunori Saito 71c6c6aba4 mavlink: Fix for divide by zero. 2015-02-16 06:49:27 +01:00
Lorenz Meier ccc6f0b020 Improve multi-stream handling by template and index usage. Can be consolidated slightly once multiplatform code knows about multi-topics 2015-02-13 09:33:12 +01:00
Lorenz Meier dcf03a2594 mavlink app: Use actuator controls message 2015-02-13 09:33:12 +01:00
Lorenz Meier 5fae142bbc Delete stream name in same thread as where its created 2015-02-10 16:31:24 +01:00
Lorenz Meier 9183949a1e mavlink app: Only stop sending if really no more space is available. 2015-02-10 16:31:24 +01:00
Lorenz Meier c371eb9b90 Fix up test routines. Needs more work. 2015-02-09 17:15:28 +01:00
Trent Lukaczyk 99557aec52 revert debug items 2015-02-06 18:57:53 -08:00