Commit Graph

797 Commits

Author SHA1 Message Date
Mark Charlebois 187f13cd70 QuRT and POSIX changes - part 4
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:24:31 -07:00
Mark Charlebois c802beb3d7 QuRT and POSIX changes - part 3
More staged changes to support QuRT and related POSIX changes

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:13:08 -07:00
Mark Charlebois f63ab3d5e3 Merge branch 'master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	makefiles/firmware.mk
2015-04-22 10:38:46 -07:00
Roman Bapst 5b772e5720 update vehicle status before doing preflight checks 2015-04-22 13:32:09 +02:00
Lorenz Meier 5e584c2942 commander: Better low battery failure feedback 2015-04-22 09:27:03 +02:00
Mark Charlebois da29004a26 Sync state_machine_helper_posix to state_machine_helper
state_machine_helper_posix.cpp was out of sync with
state_machine_helper_posix.cpp.

Added debug to detect when sensors is started before uorb.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 22:04:01 -07:00
Mark Charlebois 3f7d4de74a Posix: fixed ioctl calls to be px4_ioctl
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 17:26:07 -07:00
Mark Charlebois 19162ba5be Posix: Changed PreflightCheck to read Vdev
PreflightCheck was failing because it was trying to read actual
devices instad of virtual devices.

ADCSIM had a LINUXTEST ifdef that was removed.

posix_run.sh was using the wrong path

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 17:14:52 -07:00
Mark Charlebois f3b5076d70 Linux to posix conversion
Changed "linux" target to "posix". Most of the changes are shared with
QuRT and with OSX. The Linux specific parts are in for i2c which uses
<linux/i2c.h> and <linux/i2c-dev.h>.

There is also a check for __PX4_LINUX in mavlink for a tty ioctl that is
not supported.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 09:53:09 -07:00
Lorenz Meier 5a8eca75bf Commander: Fix RTL mode switch logic 2015-04-21 06:54:16 +02:00
Lorenz Meier b9d17241a3 RTL mode switching: Allow to flick to RTL in any mode. 2015-04-21 06:54:15 +02:00
Mark Charlebois 260bbcb64a Nuttx: fixups after rebase on Linux
Seems that mavlink_receiver_linux.cpp inherited the history
from mavlink_receiver.cpp so updates went to it vs mavlink_receiver_nuttx.cpp

Two module.mk files used ifdef instead of ifeq.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:57:02 -07:00
Mark Charlebois 455b0dcaff Fixed parenthesis bug
Clang found the following:
       if (fabsf(airspeed.indicated_airspeed_m_s > 6.0f))

which is doing fsbsf( bool )

Fixed to be:
       if (fabsf(airspeed.indicated_airspeed_m_s) > 6.0f)

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:04:46 -07:00
Mark Charlebois f44a23bc26 Check stack for commander only for NuttX
Turn off check of stack if not a NuttX build

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois d2f0572ce6 Linux: added builtins to show devices and topics
list_devices will list virtual devices starting with "/dev/".
list_topics will list topics ("/obj/")

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 694427e4ba Converted commander to use px4_posix calls
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois bba26c3430 Linux: enabled commander module
The commander module now compiles for Linux.

state_machine_helper_linux.cpp iterates over the virtual devices vs
all devices under /dev as per NuttX when disabling publishing.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -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 0a526e2a5f commander: Provide feedback that preflight check failed. 2015-04-20 09:14:14 +02:00
Lorenz Meier 17e487cad4 Update commander test suite 2015-04-20 09:14:14 +02:00
Lorenz Meier c92afb99b6 Prearm check: provide user instruction to power cycle if things look good 2015-04-20 09:14:14 +02:00
Lorenz Meier 554719c78f Harmonize preflight and prearm checks, run same code except for dynamic range check only on arming 2015-04-20 09:14:13 +02:00
Lorenz Meier 4f0896b105 commander tests: Update test routine to match expected / designed error handling behaviour 2015-04-20 09:14:13 +02:00
Lorenz Meier 7dbb6c4fa8 Commander: Improved preflight check routines. Running checks on all connected sensors. Re-run checks once GCS is connected. 2015-04-20 09:14:13 +02:00
Johan Jansen 7a4ac0ad7f Commander: Ignore sensor status on in-air restore 2015-04-20 09:14:13 +02:00
Johan Jansen 4654d0f4fc Commander: Enter ARMING_STATE_STANDBY_ERROR by default if preflight has failed 2015-04-20 09:14:12 +02:00
Johan Jansen b70138c631 Commander: Re-run preflight check after calibration 2015-04-20 09:14:12 +02:00
Johan Jansen c5a178a777 Commander: Play startup tune if preflight checks are good, play alarm otherwise 2015-04-20 09:14:12 +02:00
Johan Jansen 6f338eb1b2 Commander: Run preflight check on boot 2015-04-20 09:14:12 +02:00
Johan Jansen fde244f903 Commander: Add PreflightCheck to the commander 2015-04-20 09:14:12 +02:00
Lorenz Meier 1da048549a commander gyro cal: Optimize parameter set calls and allow up to 0.0055 rad/s deviation - tuned to allow in-field calibration, but fail anyone really rotating during the step 2015-04-19 16:06:52 +02:00
Lorenz Meier 1685f77031 Loosen the thresholds on gyro calibration based on in-field calibration feedback 2015-04-19 15:36:02 +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 05c351183f Parameter meta data fixes 2015-04-15 11:29:37 -07:00
Don Gagne 3dc8cf8769 Clean up parameter meta data as needed by QGC 2015-04-14 23:26:14 -07:00
Lorenz Meier 2d985dbed3 commander: Set param autosave to on by default 2015-04-10 17:32:09 +02:00
Thomas Gubler a872b69df1 add parameter to control autosave of parameters 2015-04-10 17:30:22 +02:00
Thomas Gubler f6f8d646d1 commander: rename variable to avoid confusion with parameter 2015-04-10 17:30:22 +02:00
Thomas Gubler 7a2bb7c03a commander: fix whitespace 2015-04-10 17:30:22 +02:00
philipoe 9a9efdaaa5 commander: Increase timeout on airspeed sensor for the prearm_check 2015-04-07 15:25:45 +02:00
Lorenz Meier 26ccac347d commander: Go only into armed error state if on low battery and disarmed 2015-04-04 10:18:40 +02:00
Lorenz Meier 64cdcfc0cc Fix detection of USB connected state. Needs bench test without USB 2015-04-04 10:15:46 +02:00
Don Gagne bb6b30f57a Report alternate side done 2015-04-03 19:51:58 -07:00
Lorenz Meier 17ee20a338 commander: Improve gyro cal 2015-03-28 16:44:26 -07:00
Lorenz Meier cb99467cde commander: Remove unnessary sleep 2015-03-28 14:00:17 -07:00
Lorenz Meier 8ebf9755e4 commander: Fix battery config 2015-03-28 13:54:05 -07:00
Don Gagne 48e88ec551 Set CAL_MAG_ID correctly 2015-03-28 13:09:07 -07:00
Don Gagne d88916d20e New mag cal changes
- Use new calibrate_from_orientation worker routine to detect
orientaions
- Calibrate all mags at once
- Change to 3-side calibration mechanism
2015-03-28 13:09:07 -07:00