Commit Graph

12236 Commits

Author SHA1 Message Date
Andrew Tridgell 636188014d APM_OBC: make the ENABLE flag control presence of the parameters 2016-08-16 12:55:50 +10:00
Andrew Tridgell 119e312cd3 AP_BoardConfig: wait up to 0.4s for safety to be off on boot 2016-08-16 12:53:34 +10:00
Andrew Tridgell dddaded8d4 HAL_PX4: fixed a race condition in force_safety_on/off
the status update from IO may not have come through if we force safety
on and then off in quick succession, such as for plane mixer load

this forces the ioctl to be sent at least once
2016-08-16 12:53:34 +10:00
Andrew Tridgell 1fa137caad GCS_MAVLink: added handle_preflight_reboot() 2016-08-16 12:53:33 +10:00
Lee Hicks 51e8d8a294 AP_GPS: Don't send config blob to GPS unless AUTO_CONFIG=1
All GPS types will recieve startup up blob config. For
some recievers this will cause them to hang. This commit
only allows sending of blobs if AUTO_CONFIG=1. Fixes #2622
2016-08-16 10:56:37 +10:00
Lee Hicks 7c3b8dceb9 AP_GPS: Fixed GPS serial speeds starting at 1 instead of 0
The counting of this will increment the counter before
selecting the baud speed, skipping the first baud rate.
2016-08-16 10:56:36 +10:00
Lee Hicks 3dd4f30460 AP_GPS: Adding 19200 as serial speed for GPS
APM supports baud speeds of 19200, but GPS baud rates
don't support it. This commit adds it to follow APM supported
baud rates.
2016-08-16 10:56:36 +10:00
Leonard Hall 29d4790fc7 AC_AttControl: reduce max_rate_step based on hover throttle
This changes reduces AutoTune's twitch size based on the hover throttle
This method is only used by AutoTune
2016-08-12 22:29:53 +09:00
Peter Barker 8d253dec8e DataFlash: support for mavlink SENSOR message 2016-08-11 17:48:44 -03:00
Grant Morphett 30bcea73cc PX4: Added detection for MPU6000 on px4slim. 2016-08-11 08:39:16 +10:00
LukeMike 38150a5544 AP_BoardConfig: defined and managed VRBRAIN board type and all functions for sensors startup 2016-08-11 07:52:40 +10:00
LukeMike e6c8653302 AP_IRLock_PX4: enabled sensor driver startup on bus2 if don't start on bus1 2016-08-11 07:52:39 +10:00
LukeMike 316e5acaec AP_OpticalFlow_PX4: enabled sensor driver startup for all VR boards 2016-08-11 07:52:39 +10:00
Andrew Tridgell 38ebe582cc AP_BoardConfig: fixed for VRBrain build
needs access to driver start function
2016-08-10 20:43:03 +10:00
Andrew Tridgell eaa88b1223 AP_BoardConfig: FMUv1 does not have pwm_input driver 2016-08-10 19:54:01 +10:00
Andrew Tridgell 39676d686c AP_BoardConfig: FMUv1 does not have an L3GD20 2016-08-10 19:54:01 +10:00
Andrew Tridgell 7da89c611d AP_BoardConfig: use a STATUSTEXT to show better in MP
this makes it easier to see why it won't boot
2016-08-10 19:54:01 +10:00
Andrew Tridgell 78b2924c00 AP_OpticalFlow: auto-start px4flow driver if enabled 2016-08-10 19:54:01 +10:00
Andrew Tridgell 74182b6b3d AP_Notify: auto-start oreoled driver if enabled 2016-08-10 19:54:00 +10:00
Andrew Tridgell e24cebec33 AP_IRLock: auto-start batt_smbus driver if enabled 2016-08-10 19:54:00 +10:00
Andrew Tridgell d05a08ff4d AP_BattMonitor: auto-start batt_smbus driver if enabled 2016-08-10 19:54:00 +10:00
Andrew Tridgell 0d59935847 AP_BoardConfig: fixup for merge after VRBrain changes 2016-08-10 19:54:00 +10:00
Andrew Tridgell 77bee322e9 AP_BoardConfig: support the PHMINI as BRD_TYPE=5 2016-08-10 19:54:00 +10:00
Andrew Tridgell 61e15af3ca AP_BoardConfig: added BRD_TYPE
this allows for PH2SLIM support with BRD_TYPE=6
2016-08-10 19:54:00 +10:00
Andrew Tridgell 7c5171e9b9 AP_BoardConfig: set default temperature on PH2 to 60 2016-08-10 19:54:00 +10:00
Andrew Tridgell 7806aa4274 AP_BoardConfig: moved optional sensors to the sensor startup
this makes startup much faster
2016-08-10 19:54:00 +10:00
Andrew Tridgell 36e0c7229a AP_BoardConfig: implement PX4 driver start in C++
this brings driver startup into AP_BoardConfig, so we can start to
make driver startup depend on parameters
2016-08-10 19:53:59 +10:00
Andrew Tridgell 4643d6f314 AP_BoardConfig: break out PX4 setup from main code
refactoring in preparation for larger changes
2016-08-10 19:53:59 +10:00
Andrew Tridgell e82384990d AP_BoardConfig: moved px4 variables to px4 structure
refactoring in preparation for larger changes
2016-08-10 19:53:59 +10:00
Andrew Tridgell 270fa95a8d AP_Morors: scale colyaw to match previous behaviour
this was missed in the motor scaling changes. Thanks to Rob for
noticing this.
2016-08-10 07:58:06 +10:00
Tom Pittenger a66e248f5c AP_Airspeed: remove AP_Vehicle::FixedWing dependency 2016-08-08 00:12:42 -07:00
Tom Pittenger ce7b766d8b AP_Airspeed: remove AP_Vehicle::FixedWing dependency 2016-08-08 00:02:42 -07:00
Tom Pittenger ae46c38ff7 AP_Airspeed: pass in max airspeed via function call instead of using aparm 2016-08-08 00:02:42 -07:00
Randy Mackay ad697243b3 AP_MotorsMulticopter: initialise some members
This resolves some Covarity warnings at the cost of a small amount of flash
2016-08-08 13:31:30 +09:00
Randy Mackay 3c87f67212 AC_PrecLand: initialise some members
This was not a real problem but it resolves some Covarity warnings
2016-08-08 13:31:28 +09:00
Leonard Hall 50b694444b AC_AttControl: correct method comments
No functional change
2016-08-08 11:24:42 +09:00
priseborough e6f36f04db AP_NavEKF2: Enable automatic use of range finder height
The EK2_RNG_USE_HGT parameter sets the height (expressed as a percentage of the maximum range of the range finder as set by the RNGFND_MAX_CM parameter) below which the range finder will be used as the primary height source when the vehicle is moving slowly.

When using a height reference other than GPS, the height datum can drift due to air pressure changes if using baro, or due to terrain height changes if using range finder as the primary height source. To ensure that a consistent height datum is available when switching between altitude sources, the WGS-84 height estimate of the EKF's local positi norigin is updated using a
single state Bayes estimator,

If rngfinder or gps height data is lost whilst being used, there will be a fall-back to baro data.
2016-08-08 10:56:44 +09:00
Tom Pittenger 1586abab8d Revert "AP_Airspeed: Converted library to be stand-alone from APM:Plane."
This reverts commit 5439257236.
2016-08-07 17:54:24 -07:00
Tom Pittenger 82777873af Revert "APM_Control: Convert references to AP_Airspeed."
This reverts commit cc5a2417a6.
2016-08-07 17:54:24 -07:00
Tom Pittenger e5bd23e34a Revert "AP_TECS: Convert references to AP_Airspeed."
This reverts commit 09d53eaeca.
2016-08-07 17:54:24 -07:00
Tom Pittenger 44037c13a1 Revert "AP_Vehicle: Removed unused airspeed_min and airspeed_max as now part of AP_Airspeed."
This reverts commit bf7ab052c1.
2016-08-07 17:54:24 -07:00
Tom Pittenger 8dad05d12e Revert "Airspeed: store reference in libraries and populate it"
This reverts commit c090ba2257.
2016-08-07 17:54:24 -07:00
LukeMike 5987cc273f AP_HAL_VRBRAIN: added some new modules for I2C wrapper 2016-08-07 20:31:52 +10:00
LukeMike 7ee8898948 AP_BoardConfig: updated defines for VRBRAIN 2016-08-07 20:31:52 +10:00
LukeMike 95ae69eb1c VRBRAIN /AP_BoardConfig: changed definition of PWM_SERVO_MODE_12PWM only for VRBRAIN 2016-08-07 20:31:52 +10:00
LukeMike 024d3311b3 VRBRAIN / AP_BoardConfig: enabled PWM configuration and safety management for all VirtualRobotix boards 2016-08-07 20:31:51 +10:00
LukeMike 9f8b66758c VRBRAIN / AP_OpticalFlow: enabled OpticalFlow_PX4 for all VirtualRobotix boards 2016-08-07 20:31:51 +10:00
LukeMike 6748bdb1a4 AP_Notify/ExternalLED: added HIGH and LOW definition 2016-08-07 20:31:51 +10:00
LukeMike 858c22ae21 VRBRAIN /AP_Notify: enabled tone_alarm for all VirtualRobotix boards 2016-08-07 20:31:51 +10:00
LukeMike 13e3150023 VRBRAIN / AP_HAL_Boards: definition of new board VR Brain 5.4 and VR Core 1.0 2016-08-07 20:31:51 +10:00
LukeMike b5cf0308cd VRBRAIN / AP_BattMonitor_Analog: definition of default value for battery monitor for all VirtualRobotix boards 2016-08-07 20:31:51 +10:00
LukeMike 4d8e7f1783 VRBRAIN / AP_Airspeed: defined ARSPD_DEFAULT_PIN for VR Brain 5.4 and VR Core 1.0 2016-08-07 20:31:51 +10:00
LukeMike d8cc2668cb VRBRAIN / AP_AHRS_NavEKF: set AP_AHRS_WITH_EKF1 to 1 only for VR Brain 5.4 2016-08-07 20:31:51 +10:00
LukeMike 998033286d AP_HAL_PX4 / Semaphores: removed AP_HAL_VRBRAIN (for now it's better to have different AP_HAL for PX4 and VRBRAIN) 2016-08-07 20:31:50 +10:00
LukeMike fde5992b6d VRBRAIN: updated AP_HAL_VRBRAIN 2016-08-07 20:31:50 +10:00
Leonard Hall 34055944cd AC_PosControl: fix relax_alt_hold_controllers 2016-08-05 12:40:37 +09:00
Randy Mackay 24044e5611 AC_AttControl: get_throttle_avg_max always returns value in 0 to 1 range
throttle_avg_max is the total average throttle level (expressed as a number from 0 to 1) that the motors can safely be raised to in order to maintain attitude control.  This level can be higher than the pilot's or autopilot provided throttle level.
Previously passing in a negative throttle_in could result in a negative throttle_avg_max being returned.
2016-08-05 12:40:37 +09:00
Leonard Hall ac04fcd836 AC_AttControl: fix set_yaw_target_to_current_heading 2016-08-05 12:40:37 +09:00
Leonard Hall 011bc0a350 AC_AttControl: add reset_rate_controller_I_terms() 2016-08-05 12:40:37 +09:00
Tom Pittenger e63e7a5336 AP_NavEKF: comment that param "Enable" index is moved to top 2016-08-04 11:32:46 -07:00
Tom Pittenger 9b33280795 APM_OBC: set param "Enable" to be FLAG_ENABLE and move to top 2016-08-04 11:32:02 -07:00
Tom Pittenger 28648665b9 AP_Terrain: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:31:37 -07:00
Tom Pittenger ebe829614d AP_Parachute: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:31:21 -07:00
Tom Pittenger b1ef848de6 AP_EPM: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:30:50 -07:00
Tom Pittenger 0d14941eea AP_Avoidance: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:30:39 -07:00
Tom Pittenger c07b85f9bb AP_Airspeed: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:30:22 -07:00
Tom Pittenger dd5ed7e2e0 AC_Sprayer: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:30:03 -07:00
Tom Pittenger ccb0151816 AC_PrecLand: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:29:45 -07:00
Tom Pittenger 5e811b8463 AC_Fence: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:29:30 -07:00
Tom Pittenger c090ba2257 Airspeed: store reference in libraries and populate it
- also had to move the initial definition in plane.h so it happened before the others.
2016-08-04 11:06:44 -07:00
AndersonRayner bf7ab052c1 AP_Vehicle: Removed unused airspeed_min and airspeed_max as now part of AP_Airspeed. 2016-08-04 10:09:04 -07:00
AndersonRayner 09d53eaeca AP_TECS: Convert references to AP_Airspeed. 2016-08-04 10:09:04 -07:00
AndersonRayner cc5a2417a6 APM_Control: Convert references to AP_Airspeed. 2016-08-04 10:09:04 -07:00
AndersonRayner 5439257236 AP_Airspeed: Converted library to be stand-alone from APM:Plane.
Additional changes:
   ARSPD_FBW_MIN and ARSPD_FBW_MAX renamed to ARSPD_MIN and ARSPD_MAX
   ARSPD_MIN and ARSPD_MAX changed to floats
2016-08-04 10:09:04 -07:00
Andrew Tridgell 66c4995c9d AP_Motors: added get_desired_spool_state() 2016-08-04 09:43:40 -07:00
murata b6c27b58a8 AC_Fence: magic number 4 changed to size of uint32_t 2016-08-04 15:26:18 +09:00
Pavel Kirienko 9b786559d4 Fixed missing definition error UAVCAN_IOCS_HARDPOINT_SET 2016-08-04 09:16:02 +10:00
Pavel Kirienko fccdcf50c1 EPM: fixed build 2016-08-04 09:16:02 +10:00
Pavel Kirienko 8af6af004d EPM: fixed parameter comments 2016-08-04 09:16:02 +10:00
Pavel Kirienko accf118e38 UAVCAN hardpoint control 2016-08-04 09:16:02 +10:00
Murilo Belluzzo 077e03678f Global: Adapt Stream class to be used with Ringbuffer 2016-08-03 01:44:02 -03:00
Murilo Belluzzo b856d26087 RingBuffer: ::set_size now returns true or false 2016-08-03 01:44:02 -03:00
Murilo Belluzzo f7f203efa9 RingBuffer: Add ::clear() method to discard the buffer content
The same could be achieved with ::set_size(::get_size()), but was not
obvious and hurts code readability.
2016-08-03 01:44:02 -03:00
Murilo Belluzzo 75a1b102fb RingBuffer: Handle zero sized better
Sometimes (like in DataFlash) the size of the ring buffer will be
determined in run time and the object can have size zero until proper
initialization. When this was the case, an underflow in ::get_size would
mess with the initializing algorithm.

Another issue was that the 'new' operator could fail what was not being
handled. Now, we only set the size member after we are sure 'new'
successfully allocated memory.
2016-08-03 01:44:02 -03:00
Murilo Belluzzo fe48901db0 AP_ADC_ADS1115: Remove resource leak.
Constructor allocate '_samples' but there was no destructor to
deallocate it. Also, initializes '_gain' to silence CID 9144 although
'_gain' wasn't being used uninitialized because of ::init().

CID 91424
2016-08-03 00:24:55 -03:00
Murilo Belluzzo 36bdd7f1f1 AP_InertialSensor: MPU6000: Add missing read() check 2016-08-03 00:18:20 -03:00
Lucas De Marchi 0d4caa3ccc AP_Math: remove declaration of not implemented functions 2016-08-03 00:16:35 -03:00
Murilo Belluzzo 70942472d3 AP_Math: Matrix: Change deallocator to match allocator used 2016-08-03 00:09:11 -03:00
Murilo Belluzzo e17fdb2aa9 DataFlash: Avoid null pointer dereference
Confirms that the loop successfully found a log structure before using it.

Should fix CID 126742
2016-08-03 00:02:19 -03:00
Holger Steinhaus cc4fafc3e4 AP_GPS_PX4: fixed GPS epoch calculations 2016-08-02 11:20:48 +10:00
Tom Pittenger 282817eeb9 AP_ADSB: revert default enable = 0 2016-08-01 17:56:04 -07:00
Tom Pittenger b5ec37b9d8 AP_ADSB: change adsb.enable param to be a flag 2016-08-01 17:51:24 -07:00
Tom Pittenger 2be32e9daa AP_ADSB: remove all threat logic in adsb lib in favor of avoidance lib 2016-08-01 15:27:40 -07:00
Tom Pittenger b2b63b4d80 AP_ADSB: change param ADSB_ENABLE default from 0 to 1 2016-08-01 15:27:39 -07:00
Tom Pittenger 89271c29ab AP_ADSB: move variable into struct like the rest 2016-08-01 15:27:38 -07:00
Tom Pittenger f7c2df8e91 AP_ADSB: sanity check data via valid_flags before forwarding to avoidance lib 2016-08-01 12:47:18 -07:00
Tom Pittenger 5c0b5f5cd1 AP_ADSB: reject packets that are invalid or already stale 2016-08-01 12:44:20 -07:00
Tom Pittenger b12edf6a71 AP_ADSB: fix bug where the update timeout wasn't being stored correctly
- causes immediate timeout so all samples were dropped
- now the timeout is current and respects the time-since-last-comms/packet so we can ignore stale packets
2016-08-01 12:43:47 -07:00
Tom Pittenger e0bb77726e AP_ADSB: do not service transceiver if it is not detected
- also allow forced detected (setting chan in header) for testing by not having it time out in that special case (timer = 0)
2016-08-01 09:06:05 -07:00
Peter Barker 2844190e5b AP_RangeFinder: correct DisplayName comments 2016-08-01 09:55:25 -03:00