Commit Graph

819 Commits

Author SHA1 Message Date
Lorenz Meier 4565f57468 Merged release_v1.0.0 into master 2015-05-27 15:28:41 -07:00
Lorenz Meier c18210b163 commander: Update command names 2015-05-27 15:21:33 -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 6253f6154f commander: rename field for RC input mode 2015-05-25 16:34:42 +02:00
Lorenz Meier 81240d6040 commander: Initial RC detection is only an info string 2015-05-24 23:31:58 +02:00
Lorenz Meier 009815deb0 Improve config and mapping 2015-05-24 20:11:51 +02:00
Lorenz Meier 01fd84e4dc mavlink and commander app: Add support for manual input, either directly or via remote control 2015-05-24 20:11:50 +02:00
Lorenz Meier bed746c213 commander: Add param and mode to disable RC input in general and required validation / setup. 2015-05-24 20:11:50 +02:00
Lorenz Meier 335b212f92 commander: Better update logic, better feedback text for landings 2015-05-24 11:43:18 +02:00
Lorenz Meier 071d22a49a commander: Update ESC calibration to match QGC 2015-05-23 09:54:55 +02:00
Don Gagne 7f5a5e085c Add "calibrate esc" command 2015-05-22 22:27:43 +02:00
Don Gagne fe357a9a66 Separate timeouts for battery and high pwm 2015-05-22 11:24:07 -07:00
Don Gagne 25e7a1a49e ESC calibration re-work
- Uses standard QGC cal mavlink messaging
- Timeout if no battery connect
- Better error handling and cleanup
2015-05-22 09:29:59 -07:00
Don Gagne a6af1fc0fa Add "calibrate esc" command 2015-05-22 09:28:52 -07:00
Lorenz Meier 9cf1b4ba7a Merge branch 'release_v1.0.0' 2015-05-22 07:24:57 +02:00
Lorenz Meier 323759bb52 commander: Fix error checking and handling of level routine 2015-05-21 22:06:54 +02:00
Lorenz Meier 9179fcefc9 Calibration state machine fixes, generates less bogus error messages during calibration 2015-05-21 17:25:37 +02:00
Lorenz Meier fb4dc27bc9 commander: Improve user feedback on sensor health, in particular during calibration 2015-05-21 10:27:12 +02:00
Lorenz Meier 2903ceaacc Merge branch 'release_v1.0.0' 2015-05-20 09:00:57 +02:00
Roman Bapst e7a522edbc reset board rotation offset params if level calibration failed 2015-05-20 08:50:26 +02:00
Mark Charlebois f44444b7c4 POSIX: Converted poll to px4_poll
A new poll command was added in accelerometer_calibration.cpp
that needed to be converted to a px4_poll.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 12:06:58 -07:00
Lorenz Meier d906fb8f31 Merged master into linux 2015-05-19 21:00:02 +02:00
Roman Bapst 12c6dc8ad8 added routine for autopilot level calibration 2015-05-19 14:20:00 +02:00
Lorenz Meier 2625d3e973 Merge pull request #2175 from Zefz/preflight_gps_check
Preflight: GPS check
2015-05-19 10:10:46 +02:00
Lorenz Meier e5fad077df Merge master into linux 2015-05-18 23:28:57 +02:00
Mark Charlebois dcb55ff38d Changed isfinite to PX4_ISFINITE
There are cross platform issues with the isfinite call that are handled
by PX4_ISFINITE

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-18 09:58:49 -07:00
Johan Jansen cd67609da5 PreflightCheck: Reduce GPS timeout to 2 sec 2015-05-18 12:49:53 +02:00
Johan Jansen 38004cdd95 PreflightCheck: Increase GPS timeout to 4 sec 2015-05-18 12:31:16 +02:00
Lorenz Meier 83fdb9931a commander / mavlink: Add battery status to output BATTERY_STATUS MAVLink message 2015-05-17 17:44:51 +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
Mark Charlebois 9f391b1867 NuttX: fixes for NuttX build
In the upstream tree ringbuffer.h includes the method implementations
in the header file which causes multiple definitions in the link for
other targets. Changed so ringbuffer.cpp is build separately for other
platforms and is included by ringbuffer.h on NuttX.

uORB changes do not link without uORBTest_UnitTest.cpp enabled for
the NuttX build.

px4_getopt was not exported and wasn't visible in NuttX build.

The makefiles were restored to be as close as possible to upstream
so the NuttX build builtin's work again. The code will have to be
refactored after the merge.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-15 12:56:18 -07:00
Johan Jansen 510b6124ec Commander: Fix inverted circuit breaker logic 2015-05-14 21:20:05 +02:00
Johan Jansen 52222de021 Commander: Wait up to 1 second to allow GPS module to be detected 2015-05-14 20:59:23 +02:00
Johan Jansen fee02c6943 Commander: Fix parameter bug in preflight check function 2015-05-14 20:30:10 +02:00
Johan Jansen f020ad4ba3 Commander: Check if GPS receiver is suffering from jamming noise 2015-05-14 19:29:35 +02:00
Johan Jansen 45f1fd6634 Commander: Add preflight check for missing GPS module 2015-05-14 19:19:30 +02:00
Lorenz Meier 8a73f91ad6 Commander: Be less verbose about param saves to focus the user attention to relevant output 2015-05-14 17:33:07 +02:00
Lorenz Meier e7c3032218 Mag calibration: Accept less rotation to start the UI, ensure calibration abort does indeed abort. 2015-05-14 17:31:05 +02:00
Roman Bapst 90c3aec1fd make main LED show low and critical battery status 2015-05-13 16:24:44 +02:00
Lorenz Meier 29eeb724a1 commander: Enforce rotation during mag calibration step 2015-05-08 11:23:19 +02:00
Lorenz Meier 3be1fc7d42 commander gyro calibration: Do not require a specific position, automatically start a retry after motion on the first try 2015-05-08 11:01:19 +02:00
Mark Charlebois 3a65187303 Fixed bad merge
Forgot to remove old file line when merging the changes from master.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:00:00 -07:00
Mark Charlebois db52227409 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/modules/commander/accelerometer_calibration.cpp
2015-05-06 15:51:39 -07: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
Lorenz Meier 150c5d2d8c Commander: parameter style change 2015-05-06 19:38:53 +02:00
Mark Charlebois 0cea93a55c POSIX and QuRT: fixed calls needing px4_ prefix
There were some missed calls to open and ioctl that need to be
px4_open and px4_ioctl.

QuRT also does not provide usleep() so px4_time.h has to be included
in files calling usleep.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 12:13:39 -07:00
Roman Bapst 0217e2ed56 fix accel calibration: rotate sensor values into board frame 2015-05-05 18:41:50 +02:00
Mark Charlebois 12a25e4b63 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	makefiles/firmware.mk
	src/modules/commander/module.mk
	src/modules/mavlink/mavlink_ftp.h
	src/modules/mavlink/mavlink_tests/module.mk
2015-05-04 16:36:59 -07:00
Lorenz Meier 0e78e38cda commander: Use pre-rotated topic in board frame 2015-05-04 14:06:19 +02:00