Commit Graph

8706 Commits

Author SHA1 Message Date
Robert Lefebvre
f4ddedbffc AP_MotorsHeli: Add more parameter checks 2015-10-10 15:11:42 +09:00
Robert Lefebvre
fa24107a2a AP_MotorsHeli_RSC: Split out rotor speed estimate into it's own function 2015-10-10 15:11:40 +09:00
Robert Lefebvre
9e8f5a42f4 AP_MotorsHeli: Colyaw function to check if rotor speed control is above idle 2015-10-10 15:11:37 +09:00
Robert Lefebvre
d788f0307d AP_MotorsHeli: rework RSC output() function to implement idle speed function
Also, split out speed_ramp function
2015-10-10 15:11:35 +09:00
Robert Lefebvre
b879b312e9 AP_MotorsHeli_Single: Fix recalc_scalars function 2015-10-10 15:11:32 +09:00
Robert Lefebvre
24244ba576 AP_MotorsHeli: Create RSC_IDLE param 2015-10-10 15:11:30 +09:00
Robert Lefebvre
718397c772 AP_MotorsHeli: Change RSC output() function into a state machine. 2015-10-10 15:11:27 +09:00
Robert Lefebvre
bf0fd3b3f2 AP_MotorsHeli: Fully detail tradheli output functions and move manual servo handling 2015-10-10 15:11:25 +09:00
Robert Lefebvre
ec400e06d8 AP_MotorsHeli: Rename tradheli servo objects for clarity 2015-10-10 15:11:22 +09:00
Robert Lefebvre
6a7996d367 AP_MotorsHeli: Update includes so that it builds 2015-10-10 15:11:19 +09:00
Fredrik Hedberg
d1fbf739c0 AP_Motors: Fix param indices in AP_MotorsHeli. 2015-10-10 15:11:16 +09:00
Fredrik Hedberg
260d018db9 AP_Motors: Rename output_yaw to move_yaw in AP_MotorsHeli_Single. 2015-10-10 15:11:13 +09:00
Fredrik Hedberg
7ac02922e9 AP_Motors: Fix formatting in AP_MotorsHeli_RSC. 2015-10-10 15:11:10 +09:00
Fredrik Hedberg
fae1dcc42b AP_Motors: Fix param range comment in AP_MotorsHeli. 2015-10-10 15:11:08 +09:00
Fredrik Hedberg
cde94078b7 AP_Motors: Move traditional helicopter controls into AP_MotorsHeli_Single.
Original commit by fhedberg, had to fix merge conflicts and now it appears I did the commit?
2015-10-10 15:11:03 +09:00
Fredrik Hedberg
af1eee44ee AP_Motors: Break out yaw output in AP_MotorsHeli. 2015-10-10 15:11:00 +09:00
Fredrik Hedberg
ded265dbe1 AP_Motors: Break out servo init and reset in AP_MotorsHeli. 2015-10-10 15:10:57 +09:00
Fredrik Hedberg
54452e2a74 AP_Motors: Move rotor speed control into AP_MotorsHeli_RSC. 2015-10-10 15:10:53 +09:00
Fredrik Hedberg
e360b21b2a AP_Motors: Use C++11 initializers in AP_MotorsHeli. 2015-10-10 15:10:50 +09:00
Paul Riseborough
5aa6dc5a01 AP_NavEKF: Ensure bad mag data cannot cause the heading to reset too often 2015-09-16 15:16:09 +09:00
Paul Riseborough
efce10b6cd AP_NavEKF: Reset mag and heading states to try and pass pre-flight checks 2015-09-16 15:16:08 +09:00
Randy Mackay
72ab60a19e AP_Compass: fix consistent check for less than three compasses
Also use vector functions where available
2015-09-16 15:15:18 +09:00
Jonathan Challinger
2f4f76d17a AP_Compass: add consistent() function 2015-09-16 15:14:53 +09:00
Randy Mackay
a0906188b3 Math: add Vector2 is_zero method 2015-09-16 15:14:47 +09:00
Andrew Tridgell
08e1a66772 APM_OBC: added severities to send_statustext_all 2015-09-10 15:09:54 +09:00
Andrew Tridgell
33248b00d4 AP_NavEKF: only call calcGpsGoodToAlign if we need to
avoid calling it once we have an origin. This avoids some calculations
and string operations
2015-09-10 14:51:47 +09:00
Andrew Tridgell
c4d561a4eb AP_NavEKF: added prearm_failure_reason() 2015-09-10 14:51:25 +09:00
Andrew Tridgell
c93006dc15 AP_AHRS: added prearm_failure_reason() 2015-09-10 14:51:22 +09:00
Andrew Tridgell
c268cea08f GCS_MAVLink: added severity to send_statustext_all() 2015-09-10 14:51:19 +09:00
Andrew Tridgell
55e6008e38 GCS_MAVLink: make send_statustext_all() take a format string
this allows for formatted messages to all groundstations in libraries
2015-09-10 14:51:13 +09:00
Paul Riseborough
78ac1340c8 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-28 12:04:36 +09:00
Randy Mackay
13e360df08 Mission: sanity check location 2015-08-28 12:04:32 +09:00
Randy Mackay
f3590120a5 BattMonitor: fix parameter descriptions 2015-08-28 12:04:24 +09:00
fillycheezstake
b618621303 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-28 12:04:22 +09:00
Leonard Hall
9dfe30f514 Copter: increase default thrust expo to 0.65 2015-08-28 12:04:21 +09:00
Randy Mackay
9cd5e4dd6b AC_WPNav: remove unused get_wp_radius 2015-08-28 12:04:16 +09:00
squilter
d00f9b61b4 GCS_MAVLink: make arguments mandatory for send_autopilot_version 2015-08-28 12:04:12 +09:00
squilter
8553301cdd GCS_MAVLink: send_autopilot_version accepts version 2015-08-28 10:27:00 +09:00
Randy Mackay
7299011510 GCS_MAVLink: version update after common.xml change 2015-08-28 10:26:57 +09:00
squilter
de712714ef GCS_MAVLink: regenerate common 2015-08-28 10:26:55 +09:00
Randy Mackay
730e4908a9 GCS_MAVLink: rename FIRMWARE_VERSION_TYPE and fully qualify items 2015-08-28 10:26:52 +09:00
squilter
f3f11a4e96 GCS_MAVLink: Add FIRMWARE_RELEASE_TYPE to common.xml 2015-08-28 10:26:49 +09:00
Tom Pittenger
04000faa5f AP_InertialSensor: correct USE param storage index
USE, USE2, USE3 have 20, 21, 21 but should be 20, 21, 22
2015-08-28 10:26:21 +09:00
Randy Mackay
bf584af9b0 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 20:45:13 +09:00
Randy Mackay
f61c62b44a Math: maxf and minf functions 2015-08-19 20:45:12 +09:00
Randy Mackay
0ea47ea7b8 NavEKF: IMUSwitchState enum 2015-08-19 20:45:11 +09:00
Randy Mackay
32c7fe996a 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 20:45:10 +09:00
Paul Riseborough
77cac09bf6 AP_NavEKF: Add hysteresis to IMU switching logic 2015-08-19 20:45:09 +09:00
Paul Riseborough
e4a4dc26c8 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 20:45:07 +09:00
Randy Mackay
e2c8d6eb9d AHRS_NavEKF: integrate INS use_accel 2015-08-19 20:45:06 +09:00
Randy Mackay
437074a8fb AHRS_DCM: integrate INS use_accel 2015-08-19 20:45:05 +09:00
Randy Mackay
456bde4986 NavEKF: incorporate use_gyro and use_accel 2015-08-19 20:45:04 +09:00
Randy Mackay
1d752fc763 INS: add USE parameters 2015-08-19 20:45:03 +09:00
Randy Mackay
586d7399ee InertialSensor: add vibration monitoring of 2nd IMU 2015-08-19 20:45:02 +09:00
Tom Pittenger
7b611f8e26 GCS_MAVLink: add support for try send mission_item_reached
also moved most of send_item_reached into common library
2015-08-19 20:44:57 +09:00
Brad Bosch
4af7e454df HAL_VRBrain: Rework of support for FLOW_CONTROL_AUTO from PX4 HAL 2015-08-19 20:44:54 +09:00
Brad Bosch
d4c370ce6e 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 20:44:53 +09:00
Brad Bosch
7bae269931 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 20:44:52 +09:00
Lucas De Marchi
eedc631eca AP_Param: add missing header StorageManager.h 2015-08-19 20:44:50 +09:00
Lucas De Marchi
ef1ed5fcfe 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-19 20:44:47 +09:00
Lucas De Marchi
72391fddbe GCS_MAVLink: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-19 20:44:46 +09:00
Lucas De Marchi
b6d69d9767 DataFlash: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-19 20:44:45 +09:00
Lucas De Marchi
2a213e7c42 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-19 20:44:43 +09:00
Lucas De Marchi
d67e775d76 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-19 20:44:42 +09:00
Lucas De Marchi
bc730149c7 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-19 20:44:41 +09:00
Lucas De Marchi
319220c6ba 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-19 20:44:40 +09:00
Lucas De Marchi
197cedca00 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-19 20:44:39 +09:00
Lucas De Marchi
fc7a6632a9 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-19 20:44:38 +09:00
Lucas De Marchi
f8cf5a63dc 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-19 20:44:37 +09:00
Lucas De Marchi
77c236a6b7 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-19 20:44:36 +09:00
Lucas De Marchi
d2adc99d3a AP_HAL: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-19 20:44:35 +09:00
Lucas De Marchi
4479b0aff1 AP_GPS: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-19 20:44:34 +09:00
Lucas De Marchi
f5ec94df02 AP_Compass: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-19 20:44:33 +09:00
Lucas De Marchi
8062a5c2f5 AP_AHRS: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-19 20:44:31 +09:00
Andrew Tridgell
12ae3c5031 SITL: added ignition control for gas heli 2015-08-19 20:44:30 +09:00
squilter
e90d228138 GCS_MAVLink: version update after generate 2015-08-19 20:44:26 +09:00
squilter
cf5005b95f GCS_MAVLink: generate after flight_termination change 2015-08-19 20:44:25 +09:00
squilter
487896c2c4 GCS_MAVLink: rename flighttermination capability enum 2015-08-19 20:44:24 +09:00
Andrew Tridgell
3990332745 HAL_PX4: prevent error on GPIO line on change of pinMode
thanks to Michael for noticing this
2015-08-19 20:44:20 +09:00
Andrew Tridgell
a341403bff AP_InertialSensor: setup for MPU9250 support on PX4 2015-08-19 20:44:18 +09:00
Andrew Tridgell
e50aab180b SITL: tidy up frame handling a bit 2015-08-19 20:44:07 +09:00
Fredrik Hedberg
3ea31099d7 SITL: Add HELI_DUAL_FRAME and HELI_COMPOUND_FRAME. 2015-08-19 20:44:06 +09:00
Michael du Breuil
f10f4a82ba 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-19 20:44:05 +09:00
Randy Mackay
f6965fffdc NavEKF: check baro health before consuming 2015-08-19 20:44:01 +09:00
Andrew Tridgell
0218e4ac86 AP_RPM: fixed build error 2015-08-19 20:43:55 +09:00
Andrew Tridgell
90d760f50e 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-19 20:43:50 +09:00
Andrew Tridgell
10b8192463 DataFlash: added RPM logging 2015-08-19 20:43:47 +09:00
Andrew Tridgell
8efaa74b38 GCS_MAVLink: regenerate headers 2015-08-19 20:43:45 +09:00
Andrew Tridgell
bfd409b465 GCS_MAVLink: added RPM MAVLink message 2015-08-19 20:43:44 +09:00
Andrew Tridgell
e3109a397e AP_RPM: first version of RPM sensor driver 2015-08-19 20:43:43 +09:00
squilter
e0baaa516a GCS_MAVLink: update common.h enum 2015-08-19 20:43:36 +09:00
squilter
f4e2463edc Common: add 21196 for emergency disarm 2015-08-19 20:43:34 +09:00
squilter
4cf49b1f4e Common: add two new capabilities 2015-08-19 20:43:33 +09:00
Andrew Tridgell
6f6afe663c RC_Channel: fixed example build 2015-08-19 20:43:32 +09:00
Andrew Tridgell
bc83623ec7 AP_HAL: fixed example builds 2015-08-19 20:43:31 +09:00
Andrew Tridgell
a7bd3d1c54 AP_InertialSensor: removed AVR1280 specific ifdef 2015-08-19 20:43:30 +09:00
Andrew Tridgell
fbcacbd1d4 AP_Compass: removed AVR1280 specific ifdef 2015-08-19 20:43:29 +09:00
Gustavo Jose de Sousa
f92833950b 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-19 20:43:26 +09:00
Gustavo Jose de Sousa
12d9f2b765 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-19 20:43:25 +09:00
Gustavo Jose de Sousa
703b27bde7 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-19 20:43:24 +09:00