Commit Graph

3513 Commits

Author SHA1 Message Date
Andrew Tridgell
04835b095f AC_Fence: fixed examples build 2013-07-15 14:09:18 +10:00
Andrew Tridgell
c7141c4851 AP_GPS: fixed examples build 2013-07-15 14:09:07 +10:00
Andrew Tridgell
0f72eae216 AP_Camera: removed 3 camera trigger types that do not work
the trigger by wp distance, trigger with throttle off and trigger a
transistor all don't work, and are not structured correctly, plus are
dangerous.

The existing relay support can (correctly!) handle the resistor case
without hard-wiring a pin. The "turn off throttle to trigger" idea is
badly broken, it would crash a copter if it worked. We can make it
work properly on planes if there is demand. As it was it didn't work
anyway. 

The triggger by wp distance method was broken, and had no way to
initiate a trigger anyway
2013-07-15 09:55:38 +10:00
Randy Mackay
bd6a60f28b AP_Math: add M_PI_2 definition
Required when building under arduino
2013-07-14 15:57:26 +09:00
Randy Mackay
8545071a21 GCS_MAVLink: include AP_Math.h
Required because mavlink_conversions's mavlink_dcm_to_euler function
uses atan2
2013-07-14 15:56:58 +09:00
Randy Mackay
9b40ba98d7 GCS_MAVLink: regenerated messages 2013-07-14 15:52:55 +09:00
Randy Mackay
6bcbcc0382 GCS_MAVLink: add DO_SET_ROI to common.xml 2013-07-14 15:49:17 +09:00
Andrew Tridgell
d9f13b6b8c GCS_MAVLink: merge in changes from upstream mavlink repo 2013-07-14 16:02:29 +10:00
Andrew Tridgell
b1202ccbff GCS_MAVLink: merge in latest upstream XML changes 2013-07-14 15:41:25 +10:00
Andrew Tridgell
9d66adae13 AP_Airspeed: added get_airspeed_ratio() and set_airspeed_ratio()
This is to help Paul develop an automatic tuning system for airspeed
ratio
2013-07-13 21:53:38 +10:00
Andrew Tridgell
cc778a68ae APM_Control: changed attitude controllers to take angular error not angle
this makes it easier for ACRO mode
2013-07-13 21:45:58 +10:00
Andrew Tridgell
b721bcc129 AP_AHRS: removed get_roll_rate_earth() and get_pitch_rate_earth()
these are not used any more
2013-07-13 21:45:58 +10:00
Andrew Tridgell
21859f9364 RC_Channel: fixed dead_zone for range channels
The dead_zone was being used inconsistently, used in PWM space in one
place, and in control output space in another.

The fix required us to move the index number of the RC channel eeprom
value for RCn_DZ, as users will have a throttle deadzone of 3 set in
their eeprom due to a bug that Randy just fixed that caused the value
to always be saved to eeprom. In plane we then need to fix the
deadzone for the throttle to be 30

this fixes issue #303

Thanks to Soren Kuula for spotting this!
2013-07-13 13:18:54 +10:00
Andrew Tridgell
086e8f80dc AP_AHRS: fixed spin rate gain conversion from degrees to radians
fixes issue #433

Thanks Jurgen!
2013-07-13 12:36:25 +10:00
Randy Mackay
effc829790 INS: relax accel offset check to 3.5 m/s/s
One user, Dusty, has found that even with offsets of 3.1 m/s/s
successful alt hold and loiter are possible
2013-07-13 10:43:07 +09:00
Randy Mackay
110966c186 AP_TECS: compile error fix for size_of(log_tuning) 2013-07-12 11:45:02 +09:00
Randy Mackay
fb5ada38c0 RC: example sketch uses set_default_dead_zone 2013-07-12 11:44:58 +09:00
Randy Mackay
47437b9ddf RC: set dead zone only if parameter has not been set by user 2013-07-12 11:44:16 +09:00
Randy Mackay
012d7b0c0a OptFlow: initialisation fix
Thanks to DongFang (aka Soren) for finding the issue and the solution
2013-07-11 14:14:37 +09:00
Andrew Tridgell
131aa53e42 AP_Relay: update for new PX4 relay pin 2013-07-11 13:50:23 +10:00
Andrew Tridgell
83b13c3d88 HAL_PX4: fixed definition of relay and piezo pins 2013-07-11 13:50:23 +10:00
Andrew Tridgell
0916388ab5 HAL_PX4: retry opening UARTs up to 5 times
this seems to help a lot with the USB port on PX4
2013-07-11 13:50:23 +10:00
Marco Bauer
72d0721721 AP_Relay: setup pin for PX4 relay support 2013-07-11 13:50:22 +10:00
Marco Bauer
a3b216bce3 HAL_PX4: added GPIO driver 2013-07-11 13:50:22 +10:00
Randy Mackay
bf5a50f738 WPNav: stopping point projection uses wp_leash 2013-07-11 11:39:44 +09:00
Andrew Tridgell
f2316747f5 APM_Control: re-work to allow for rate based control 2013-07-11 09:10:41 +10:00
Randy Mackay
345924ddec WPNav: replace LOITER_ACCEL_MAX with parameter
Also removed unused _lean_angle_max variable
2013-07-10 20:00:32 +09:00
Randy Mackay
204f613467 WPNav: bug fix to reported distance to target
This value is for reporting purposes only
2013-07-10 18:21:08 +09:00
Randy Mackay
518eba0729 WPNav: bug fix to loiter accel calculation
Contribution from Leonard Hall
2013-07-10 17:52:12 +09:00
Randy Mackay
c4f17b3235 WPNav: rounding error fix in loiter
Contributed by Leonard Hall
2013-07-10 16:24:37 +09:00
Randy Mackay
5d23d5aaa7 WPNav: reduce loiter speed used to correct pos error
Contributed by Leonard Hall
This should reduce the aggressiveness of the response when we experience
a GPS glitch
2013-07-10 15:52:18 +09:00
Randy Mackay
7860d06b91 AHRS: typo fix for ORIENTATION param description 2013-07-10 14:56:48 +09:00
Andrew Tridgell
0f72401d8d AP_Baro: added GND_ALT_OFFSET parameter
used for automatic barometric adjustment by a ground station equipped
with a barometer
2013-07-10 14:38:57 +10:00
Andrew Tridgell
469736e6bc DataFlash: changes for GPS field changes 2013-07-10 14:04:22 +10:00
Andrew Tridgell
279f6d00f0 AP_AHRS: changes for GPS field changes 2013-07-10 14:04:22 +10:00
Andrew Tridgell
7dbb898264 AP_GPS: switch fields to add units suffix
altitude -> altitude_cm
ground_speed -> ground_speed_cm
ground_course -> ground_course_cd

this helps prevent unit mixups
2013-07-10 14:04:22 +10:00
Paul Riseborough
66d60953df TECS: added height update_pitch call 2013-07-10 14:04:22 +10:00
Andrew Tridgell
9959f6b2df AP_Camera: removed incorrect mavlink sends
these sends did nothing, as MAVLINK_COMM_3 is not connected to
anything. If it was connected they would be dangerous, as a blocking
serial write could cause the stabilization of a copter not to run. If
the serial port was non-blocking it would corrupt the packet.

If we needed something like this it would have to use the MAVLink
packet queueing logic we use elsewhere
2013-07-10 11:51:40 +10:00
Craig@3DR
f5154d9e7a AP_Camera: changed update_location() to return true for camera trigger
Makes the main vehicle code responsible for taking a photo so logging can occur
2013-07-10 08:39:56 +10:00
Andrew Tridgell
7fa1fe8590 AP_Param: use 0xFFFF not __UINT16_MAX__
MacOS doesn't have __UINT16_MAX__
2013-07-09 20:51:06 +10:00
Paul Riseborough
2c5db9a165 TECS: added support for throttle nudging 2013-07-09 20:50:37 +10:00
Paul Riseborough
9c431b4a04 TECS: use altitude supplied by mainline code
this allows for use of ALT_OFFSET and ALT_MIX
2013-07-09 09:25:53 +10:00
Paul Riseborough
d8fedf994a AP_SpdHgtControl: added height above field parameter 2013-07-09 09:05:22 +10:00
Tobias
4a75351bd3 AP_Param: fixed a compiler warning with -Wsign-conversion 2013-07-08 14:57:33 +10:00
Tobias
27a5c28851 AP_Param: fixed some compiler warnings
* added comment
* replaced "~0" with the appropriate macro
* resolved -Wconversion
* saved some space by modifying AP_Param::add_vector_suffix (writing
behind buffer could happen, if buffer_size is almost uint16_max but this
can surely be ignored)

further reading:
http://stackoverflow.com/questions/809227/is-it-safe-to-use-1-to-set-all-bits-to-true
2013-07-08 14:57:33 +10:00
Tobias
ab311d1dd4 AP_Compass: removed comparison out of range compiler warning
uint_ >= 0 (-Wtype-limits)
2013-07-08 14:57:25 +10:00
Tobias
c95072ea25 AP_GPS: added explicit cast to omit [-Wconversion] warning 2013-07-08 14:53:20 +10:00
Andrew Tridgell
8c49ed78a5 AP_Math: make the rotation numbers easier to find 2013-07-08 12:17:59 +10:00
Andrew Tridgell
a6c7bd3612 AP_Compass: fixed rotations for COMPASS_ORIENT
this matches AHRS_ORIENTATION again
2013-07-08 12:17:59 +10:00
Tobias
338c054da2 Filter: validity of array index was checked AFTER accessing the element.
(correction decreased Program size by 12 bytes)
2013-07-08 12:17:59 +10:00