Commit Graph
246 Commits
Author SHA1 Message Date
Lorenz Meier adfd1b2579 sensors: Ensure data is good before publishing 2015-07-01 23:55:20 -07:00
Lorenz Meier 454becdae5 Merged release_v1.0.0 branch into master 2015-06-25 21:45:17 +02:00
Lorenz Meier 26c47f25cb PWM outputs: Allow the new p:PWM_OUT etc params for setting PWM limits via params at boot-time. 2015-06-23 12:30:47 +02:00
Lorenz Meier 79d9e1be8d sensors app: Load missing param 2015-06-19 10:44:58 -07:00
Lorenz Meier 0916e6fc19 sensors app: Populate unfiltered airspeed field 2015-06-14 12:09:21 +02:00
Mark Charlebois 83bcb95999 POSIX: Added sleep command
The baro was not fully initialized when the sensors module tried to
open it. Added a sleep command and a sleep 2 to rc.S so the baro
is initialized by the time the sensors module tried to read it.

Fixed other noisy errors

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 17:28:46 -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
Lorenz Meier d385a7f483 Ignore battery voltage only when below 2.5V, as we could be still running at that voltage 2015-05-22 21:47:18 +02:00
Lorenz Meier d530cbcda2 Ignore battery voltage only when below 2.5V, as we could be still running at that voltage 2015-05-22 21:46:58 +02:00
Mark Charlebois 0c3681c896 Sensors: added missing px4_close and removed _exit() call
The QuRT build was broken from the call to exit. While fixing
the code to clean up before returning, I found a missed call
to px4_close.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 10:26:45 -07:00
Lorenz Meier 2903ceaacc Merge branch 'release_v1.0.0' 2015-05-20 09:00:57 +02:00
James Goppert e1d2c0c5ad Move more messages to auto-generation, work on C++ code style 2015-05-20 08:57:29 +02:00
Lorenz Meier d906fb8f31 Merged master into linux 2015-05-19 21:00:02 +02:00
Roman Bapst 5c63a2d2f4 fixed sensor board rotation offset 2015-05-19 14:19:03 +02:00
Mark Charlebois 36f5d47ed9 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/modules/commander/gyro_calibration.cpp
	src/modules/mavlink/mavlink_ftp.cpp
2015-05-16 15:04:38 -07:00
Lorenz Meier a124bc07aa Ensure SYS_AUTOSTART param is always selected 2015-05-10 23:58:25 +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
Lorenz Meier 1420a0c74c Sensors: Be less verbose 2015-04-27 09:07:53 +02:00
Lorenz Meier 8e4c78cd2d Load all GCS-required params 2015-04-27 00:21:25 +02:00
Don Gagne a7f88d97b8 Sensor cal rework
- cancel support
- versioned cal messages
- better still detection
- better messaging
2015-04-26 14:34:19 +02:00
Lorenz Meier f1ff61ec4f sensors app: Move a static member to being a class member 2015-04-26 14:33:57 +02:00
Lorenz Meier 8edbf72bd5 sensors app: Use right lookup function 2015-04-26 14:02:22 +02:00
Mark Charlebois 3336fce1f4 QuRT and POSIX changes
Partial commit of the changes for QuRT and related changes for POSIX

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 00:52:44 -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 5c44146c1b sensors app: Be less verbose 2015-04-20 09:14:13 +02:00
Lorenz Meier 1c8e79cbf1 sensors app: Always set a valid rotation, even if sensor is unconfigured 2015-04-18 20:34:18 +02:00
Daniel Agar 2e824bbeea fix incorrect argc < 1 check for no arguments
-requiring arguments should be argc < 2
2015-04-18 12:02:58 +02:00
Don Gagne 07853fbb58 Fixed warnx messages to show correct sensor # 2015-03-28 13:09:07 -07:00
Lorenz Meier 81546e8f84 sensors app: Log all temperature 2015-03-25 22:58:54 -07:00
Lorenz Meier 675b86550f Sensors: Clear old mag rotation param once new values is present 2015-02-28 20:49:54 +01:00
Lorenz Meier e4830eb53f mag detection (sensors / commander): Default all sensors to internal, set the ones which have been found explicitely to zero if they were -1. 2015-02-28 04:01:10 +01:00
Lorenz Meier 2e4c0c3156 sensors app: Comment handling of old param values properly 2015-02-15 19:52:02 +01:00
Lorenz Meier 6fd89aa2bd Rsensors app: Programming style: rely on logical orr for failed evalution. 2015-02-15 19:52:02 +01:00
Lorenz Meier 4740568446 sensors: Update param name 2015-02-15 19:52:02 +01:00
Lorenz Meier 162814c33e sensors: Set up mag rotation parameters correctly 2015-02-15 19:52:02 +01:00
Lorenz Meier bed3eaafa1 Sensor app: Formatting, documentation and cleanup 2015-02-15 19:52:01 +01:00
Lorenz Meier 12ae984198 sensors app: Use -1 in rotation parameter to indicate that a sensor cannot be rotated as it is internal. 2015-02-15 19:52:01 +01:00
Lorenz Meier 3d195bc7cc Proper mag rotation handling 2015-02-15 19:52:01 +01:00
Lorenz Meier 81c9b9fd95 Get secondary mag to work, but only if internal 2015-02-10 22:01:31 +01:00
Lorenz Meier df2ad183e3 Initialize error counts high enough 2015-02-09 22:56:26 +01:00
Lorenz Meier 3a43649850 sensors app: Fix loading of calibration params 2015-02-09 22:56:25 +01:00
Lorenz Meier bd90700f59 Sensors app: Improve sensor config handling 2015-02-09 22:56:24 +01:00
Lorenz Meier ddb7d49354 Sensors: Move to 0 based indices 2015-02-09 22:56:23 +01:00
Lorenz Meier dc46736ead Merge ROS into master 2015-02-03 20:07:55 +01:00
Thomas Gubler 2252a9696d fix codestyle in sensors.cpp 2015-02-03 18:13:01 +01:00