Commit Graph

8698 Commits

Author SHA1 Message Date
Lucas De Marchi 3cb6f391d4 AP_InertialSensor: MPU6000: split detection and initialization 2015-08-28 12:39:08 +10:00
Lucas De Marchi 7d9579c5d8 AP_InertialSensor: identify backend with ID
Identify backend with an id, allowing other libraries to connect to
them. This is different from the _product_id member because it
identifies the sensor, not the board the sensor is in, which is
meaningless for our use case.
2015-08-28 12:39:07 +10:00
Lucas De Marchi 22c787058e AP_InertialSensor: allow to split detection and initialization
This allows backends to have a separate detection and initialization
logic. It doesn't change any backend yet and with the current code
there's no change in behavior either. This only allows
AP_InertialSensor::_detect_backend() to be called earlier so
AP_InertialSensor object can be used by other libraries. If it's not
called, later on AP_InertialSensor::init() will detect and start all
backends.
2015-08-28 12:39:07 +10:00
Lucas De Marchi f7954ee885 AP_InertialSensor: MPU6000: allow to read generic block
We were able to read only the block of registers that are part of the
data output from accelerometer/gyroscope. In order to support reading
the external sensors we need support for reading a generic block of
registers.
2015-08-28 12:39:07 +10:00
Lucas De Marchi b5da8ad61f AP_InertialSensor: MPU6000: rename method
We're reading the sensor data available in MPU6000 so name the method
accordingly, which is also the same name used in MPU9250.
2015-08-28 12:39:07 +10:00
Lucas De Marchi d9a4d3e777 AP_InertialSensor: MPU6000: fix leaking samples 2015-08-28 12:39:07 +10:00
Lucas De Marchi f18dd17377 AP_InertialSensor: fix typos
resister->register and fix copy and paste error from MPU6000 to MPU925.
2015-08-28 12:39:07 +10:00
squilter 426dab5078 GCS_MAVLink: update severities and remove old enum 2015-08-28 10:04:35 +10:00
squilter 4a51dcc14d GCS_Console: update severities 2015-08-28 10:04:35 +10:00
squilter dfc35cca8b AP_InertialSensor: update severities 2015-08-28 10:04:35 +10:00
squilter ddda407ff3 AP_Arming: update severities 2015-08-28 10:04:35 +10:00
Paul Riseborough 21f873662c AP_NavEKF: Prevent false triggering of optical flow takeoff detection
Now that we have a pre-arm check in place to detect bad lidar, the motion check is unnecessary and can false trigger for copters with flexible undercarriages or on uneven ground.
2015-08-27 20:57:38 +09:00
Randy Mackay 1271e531e2 Mission: sanity check location 2015-08-27 15:15:56 +09:00
Randy Mackay 9ef6abf613 AP_GPS: config file for Ublox M8N
This is not directly used by the driver but this directory is where we place the recommended GPS config files
2015-08-27 09:54:22 +09:00
Tom Pittenger 749c0c190f AP_Baro - fix BARO_ALT_OFFSET param
This param seems to have been un-implemented. This is putting it back in. Adds a meter offset to the calculated altitude form the baro sensors.
Also changes it from int8 to float
2015-08-26 13:16:05 +10:00
Randy Mackay bb891a62d3 BattMonitor: fix parameter descriptions 2015-08-26 11:17:48 +09:00
squilter 9d3a906602 GCS_Common: accept any type of severity, not just the old enum 2015-08-25 14:04:37 +09:00
Tom Pittenger 816d1f0e1b AP_GPS: resolve compiler warning re init order 2015-08-25 13:51:33 +09:00
Tom Pittenger 072d35b9cc AP_HAL_PX4: remove unused var 2015-08-25 13:51:21 +09:00
fillycheezstake 39dae7a156 Mount: fix for STORM32 serial ver 78e and higher
This fixes the structs to be compatible with the changes OlliW made to
the gimbal firmware.
http://www.olliw.eu/storm32bgc-wiki/Serial_Communication
2015-08-25 13:45:33 +09:00
Leonard Hall c357cb8f84 Copter: increase default thrust expo to 0.65 2015-08-23 16:42:05 +09:00
ziltoid2 0b1a997800 AP_IntertialSensor: don't require acceleration calibration in hil mode 2015-08-23 16:48:48 +10:00
Randy Mackay 15fc689085 AC_WPNav: remove unused get_wp_radius 2015-08-23 11:06:19 +09:00
dgrat 58e2ac4e56 Filter: Template implementation for <Filter>
There are implementations for float, Vector2f and Vector3f for the Low
Pass Filter and the *2p filter.  I tried to implement these filters
with one common template implementation.  This implementation saves
some lines of code and reduced the redundancy.  One could save even
more code if the currently overloaded isinf/isnan functions and checks
can be removed.

Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2015-08-23 11:17:02 +10:00
Tom Pittenger 2620a57700 AP_InertialSensor: Added is_still() check
very strict check that all axis are not vibrating much at all
new param: INS_STILL_THRESH used to be a vibration threshold for different platforms
// @Description: Threshold to tolerate vibration to determine if vehicle is motionless. This depends on the frame type and if there is a constant vibration due to motors before launch or after landing. Total motionless is about 0.05. Suggested values: Planes/rover use 0.1, multirotors use 1, tradHeli uses 5
2015-08-23 10:34:17 +10:00
squilter fb1bb3f571 GCS_MAVLink: make arguments mandatory for send_autopilot_version 2015-08-23 09:21:59 +09:00
Andrew Tridgell e889886e07 AP_HAL: start with the vehicle disarmed
this prevents a race condition on startup that can cause a UAVCAN ESC
to run while the vehicle is booting
2015-08-23 09:49:52 +10:00
Andrew Tridgell 31f20db139 AP_GPS: provide hdop and speed accuracy with UAVCAN GPS 2015-08-23 09:49:52 +10:00
squilter c4c63da163 GCS_MAVLink: send_autopilot_version accepts version 2015-08-21 22:40:51 +09:00
Randy Mackay a317fb40fc GCS_MAVLink: version update after common.xml change 2015-08-21 22:40:50 +09:00
squilter c10e90f837 GCS_MAVLink: regenerate common 2015-08-21 22:40:49 +09:00
Randy Mackay 79c9269891 GCS_MAVLink: rename FIRMWARE_VERSION_TYPE and fully qualify items 2015-08-21 22:40:48 +09:00
squilter 6621ecc68f GCS_MAVLink: Add FIRMWARE_RELEASE_TYPE to common.xml 2015-08-21 22:40:47 +09:00
Tom Pittenger 220163e269 AP_InertialSensor: correct USE param storage index
USE, USE2, USE3 have 20, 21, 21 but should be 20, 21, 22
2015-08-21 11:35:37 +09:00
Michael Day a5e1d8e902 AP_Mission: Give CONINTUE_AND_CHANGE_ALT a parameter: climb/descend
Param 1 denotes which direction the user expects the plane to
travel when changing altitude:

0 = no expectation, command completes when within 5 m of altitude.
1 = climb expected, command completes at or above altitude.
2 = descent expected, command completes at or below altitude.
2015-08-20 11:37:17 +10:00
Randy Mackay ec2bc5e41d NavEKF: use maxf when retrieving vibration levels
This reduces the performance hit that was caused by multiple calls to get_vibration_levels
2015-08-19 16:44:36 +09:00
Randy Mackay 46c652e42f Math: maxf and minf functions 2015-08-19 16:44:34 +09:00
Randy Mackay 629a5fd714 NavEKF: IMUSwitchState enum 2015-08-19 16:44:31 +09:00
Randy Mackay c179ed5253 NavEKF: IMU ratio set to primary accel when neither IMU is used
This forces the EKF IMU ratio to indicate which IMU is used except that it will be "0" in the unlikely case that the third IMU is used
2015-08-19 16:44:28 +09:00
Paul Riseborough 559cc29635 AP_NavEKF: Add hysteresis to IMU switching logic 2015-08-19 16:44:26 +09:00
Paul Riseborough 12e884ba6b AP_NavEKF: Modify method used to check for vibration errors
This method checks for consistency between accelerometer readings and switches to the unit with the lowest vibration of the difference exceeds 0.3g
The threshold of 1.7 m/s/s corresponds to a maximum tilt error of 10 deg assuming one IMU is good, one is bad and the EKF is using the bad IMU.
2015-08-19 16:44:24 +09:00
Randy Mackay a7569e3a61 AHRS_NavEKF: integrate INS use_accel 2015-08-19 16:44:22 +09:00
Randy Mackay 7f46cc9059 AHRS_DCM: integrate INS use_accel 2015-08-19 16:44:19 +09:00
Randy Mackay 0b981d38e8 NavEKF: incorporate use_gyro and use_accel 2015-08-19 16:44:17 +09:00
Randy Mackay e5615ec349 INS: add USE parameters 2015-08-19 16:44:15 +09:00
Randy Mackay affbd67c43 InertialSensor: add vibration monitoring of 2nd IMU 2015-08-19 16:44:12 +09:00
Tom Pittenger 1dd8b9d363 GCS_MAVLink: add support for try send mission_item_reached
also moved most of send_item_reached into common library
2015-08-19 15:26:32 +10:00
Brad Bosch 3ad0188488 HAL_VRBrain: Rework of support for FLOW_CONTROL_AUTO from PX4 HAL 2015-08-19 15:21:19 +10:00
Brad Bosch 6e9756ff79 HAL_PX4: Rework support for FLOW_CONTROL_AUTO.
Now instead of requiring the buffer to fill completely before we can
detect it is not draining, we use a time based mechanism to detect
when none of the first few bytes are transmitted after sitting in our
buffer a half second or more after flow control is enabled.  This
huristic is reliable only for the first several chracters because we
believe that the radio must still have plenty of room in it's own
buffers at that time even if it is not able to transmit them to the
other radio yet.  Note that the original algorithm made the same
assumption.

The new algorithm is especially helpful for cases where only keepalive
messages are transmitted before other packets can be requested by the
GCS.  In this situation, the original code required almost 2 minutes
to disable flow control and allow communication with the GCS.
2015-08-19 15:21:10 +10:00
Brad Bosch c87a7c7df9 GCS_MAVLink: Pause to allow serial port to drain.
This avoids a race between the UART and the auto flow control code.
2015-08-19 15:20:58 +10:00
Lucas De Marchi fa060a6124 AP_Param: add missing header StorageManager.h 2015-08-18 17:19:14 +10:00
Lucas De Marchi 29740ccb8a AP_HAL_AVR: standardize inclusion of libaries headers
It was not only standardized, but actually fixed since ".." would not
move to the libraries/ directory (and hence the include location was
actually wrong).
2015-08-18 17:12:52 +10:00
Lucas De Marchi 42fadb1845 GCS_MAVLink: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi 327a3a4298 DataFlash: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi d446381623 AP_HAL_Notify: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi 2011c4d988 AP_HAL_Mount: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi 2c44f3e313 AP_HAL_InertialSensor: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi c007720fb7 AP_HAL_InertialNav: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi c47df44f44 AP_HAL_VRBRAIN: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi ffa37e6de2 AP_HAL_SITL: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi 83cfaf4a59 AP_HAL_PX4: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi dabfeff440 AP_HAL_Linux: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi ca17b6155e AP_HAL: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi 55beb6bc0f AP_GPS: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi 7e997564bf AP_Compass: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi b43bddc0af AP_AHRS: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Andrew Tridgell 85ab1c3444 SITL: added ignition control for gas heli 2015-08-18 13:07:19 +10:00
squilter 5cd78e722e GCS_MAVLink: version update after generate 2015-08-17 17:15:48 +09:00
squilter a77329e855 GCS_MAVLink: generate after flight_termination change 2015-08-17 17:15:45 +09:00
squilter 91479aa39f GCS_MAVLink: rename flighttermination capability enum 2015-08-17 17:15:42 +09:00
Andrew Tridgell e73ac418df HAL_PX4: prevent error on GPIO line on change of pinMode
thanks to Michael for noticing this
2015-08-17 12:02:03 +10:00
Andrew Tridgell dc455a5fd6 AP_InertialSensor: setup for MPU9250 support on PX4 2015-08-17 09:33:15 +10:00
Andrew Tridgell c2e68eaf79 SITL: tidy up frame handling a bit 2015-08-13 18:44:35 +10:00
Fredrik Hedberg e2027a8414 SITL: Add HELI_DUAL_FRAME and HELI_COMPOUND_FRAME. 2015-08-13 18:23:30 +10:00
Michael du Breuil 4f9fbc5aa7 AP_GPS: Fix a bound error when calculating GNSS minimum channels.
This is really just calculating the hamming weight of the GNSS_MODE bitmask, but I don't know if the APM compiler could handle the GCC intrinsic that could calculate it faster, and this is done so rarely there isn't a significant penalty to using the for loop.
2015-08-13 15:15:20 +10:00
Randy Mackay 8b17d32994 NavEKF: check baro health before consuming 2015-08-12 16:32:48 -07:00
Andrew Tridgell fdb104b5b6 AP_RPM: fixed build error 2015-08-12 20:50:09 +10:00
Andrew Tridgell 129f33c26d AP_RPM: define a minimum acceptable period for PWM input
this will reject very short periods as invalid. This helps somewhat
with noise on the line
2015-08-12 15:03:51 +10:00
Andrew Tridgell ab7e400a89 DataFlash: added RPM logging 2015-08-12 15:03:50 +10:00
Andrew Tridgell 0fdeb276e3 GCS_MAVLink: regenerate headers 2015-08-12 15:03:50 +10:00
Andrew Tridgell 8f1e1a1b4a GCS_MAVLink: added RPM MAVLink message 2015-08-12 15:03:49 +10:00
Andrew Tridgell 39c219d452 AP_RPM: first version of RPM sensor driver 2015-08-12 15:03:49 +10:00
squilter 64a013071a GCS_MAVLink: update common.h enum 2015-08-11 17:17:44 +10:00
squilter 4cdc87fa62 Common: add 21196 for emergency disarm 2015-08-11 17:17:43 +10:00
squilter acb33cacac Common: add two new capabilities 2015-08-11 17:17:43 +10:00
Andrew Tridgell 1162503199 RC_Channel: fixed example build 2015-08-11 17:00:13 +10:00
Andrew Tridgell c72372722e AP_HAL: fixed example builds 2015-08-11 17:00:03 +10:00
Andrew Tridgell 980659d346 AP_InertialSensor: removed AVR1280 specific ifdef 2015-08-11 16:47:56 +10:00
Andrew Tridgell 69a86a78a6 AP_Compass: removed AVR1280 specific ifdef 2015-08-11 16:47:41 +10:00
Gustavo Jose de Sousa ce0cb248ce StorageManager: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:25 +10:00
Gustavo Jose de Sousa a02e7730ea SITL: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:25 +10:00
Gustavo Jose de Sousa d2780623f7 RC_Channel: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:25 +10:00
Gustavo Jose de Sousa e925820d90 PID: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:25 +10:00
Gustavo Jose de Sousa d7a2ef3e35 GCS_MAVLink: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:25 +10:00
Gustavo Jose de Sousa f551312361 GCS_Console: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:24 +10:00
Gustavo Jose de Sousa a1af0c2051 Filter: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:24 +10:00
Gustavo Jose de Sousa 709204c01d DataFlash: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:24 +10:00
Gustavo Jose de Sousa 5eea2683f2 AP_Vehicle: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:24 +10:00
Gustavo Jose de Sousa fcd1d4938a AP_Terrain: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:24 +10:00
Gustavo Jose de Sousa 1fbbe3ed81 AP_TECS: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:24 +10:00