Commit Graph

23129 Commits

Author SHA1 Message Date
Gustavo Jose de Sousa 4693501d9d AP_HAL: Device: add bus_type field
Sometimes it's necessary to know the type of bus to make some decisions where
AP_HAL::Device abstraction is used.
2016-06-27 17:18:35 -03:00
Randy Mackay 7edb6e76f0 Copter: set terrain capabilities only if terrain code is compiled in
Thanks to OXINARF for finding this
2016-06-27 17:11:06 +09:00
Michael du Breuil c2da36d505 GCS_MAVLink: fix race condition when recieving last waypoint
only shows up when the waypoint is about to time out
2016-06-27 10:57:14 +10:00
Andrew Tridgell 689595080a AP_Airspeed: ensure we have at least 10 samples for airspeed cal
thanks to Michael for pointing out this issue
2016-06-27 10:52:59 +10:00
Andrew Tridgell bf2e30f858 Plane: removed demo_servos()
this really didn't help much and slows down startup
2016-06-27 10:19:26 +10:00
Andrew Tridgell 66e43bf6a2 Plane: start with low integrator on back quadplane transition
When changing to alt_hold controller in quadplane with significant
airspeed set the initial integrator to minus the hover throttle to
allow the accel controller to climb slowly
2016-06-27 10:18:20 +10:00
Tom Pittenger 37f990bfad AP_ADSB: allow param based VEHICLE list sizes, 1 to 100. 2016-06-26 11:03:33 -07:00
Lucas De Marchi 3a5bc141bb build: use format macros in all linux boards
This doesn't work for px4 since it manually defines __STDC_FORMAT_MACROS
in some px4 modules, which needs to be updated.
2016-06-25 12:51:55 -03:00
Lucas De Marchi b70b9ed8d1 AP_HAL_Linux: fix warning on 64b printf
../../libraries/AP_HAL_Linux/Perf.cpp: In member function ‘void Linux::Perf::_debug_counters()’:
../../libraries/AP_HAL_Linux/Perf.cpp:85:36: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
                     c.name, c.count);
                                    ^
2016-06-25 12:05:55 -03:00
Randy Mackay dd5e8f3780 Copter: git ignore fence.txt 2016-06-25 15:55:55 +09:00
Randy Mackay 52d81f630f Copter: pass polygon fence mavlink messages to fence 2016-06-25 15:55:55 +09:00
Daniel Ricketts 865aad7598 AC_Avoid: add support for stopping at polygon fence 2016-06-25 15:55:55 +09:00
Randy Mackay 26a6234a29 AC_Avoid: do not attempt to stop at circular fence if already breached 2016-06-25 15:55:55 +09:00
Randy Mackay c6f9889a25 AC_Avoid: constify get_max_speed
Also get_stopping_distance and get_margin
2016-06-25 15:55:55 +09:00
Randy Mackay 5153c3d195 AC_Fence: merge with add polygon support 2016-06-25 15:55:55 +09:00
Randy Mackay d91805edbf AC_Fence: add support for polygon fences 2016-06-25 15:55:55 +09:00
Randy Mackay f0bb1ac1d2 AC_Fence: AC_Polygon_loader loads points from eeprom
Thanks to Peter Barker for his work to library-ify Plane's geofence which was the basis for this work.
2016-06-25 15:55:55 +09:00
Daniel Ricketts 249d95b413 AP_Math: add Polygon_outside and Polygon_complete functions 2016-06-25 15:55:55 +09:00
Leonard Hall 80bda572ba AC_AttutudeControl: Yaw shift fix 2016-06-24 18:15:48 +09:00
Randy Mackay b61ae1a4a1 Copter: log EKF yaw reset event 2016-06-24 18:12:30 +09:00
Leonard Hall f1bca63094 Plane: consolidate input_euler_angle calls to use smoothing gain 2016-06-24 17:17:19 +09:00
Leonard Hall 07cadc7ddd Copter: rename limit_angle_to_rate_request to use_input_shaping 2016-06-24 17:17:18 +09:00
Leonard Hall 3b7658c502 Copter: land and crash detector use thrust angle error
The thrust angle error is the difference between our desired thrust vector
and the actual thrust vector

Also some changes to use definitions in place of constants in the checks
2016-06-24 17:17:18 +09:00
Leonard Hall 7d54c268f6 Copter: consolidate input_euler_angle calls to use smoothing gain
Previously we had _smooth and non-smooth methods in the attitude
controller but as part of the move to quaternions these have been replaced
by a single call which always takes a smoothing gain
2016-06-24 17:17:17 +09:00
Leonard Hall a5bb3c206e Dataflash: Log rate to degrees 2016-06-24 17:17:16 +09:00
Leonard Hall 8737f6b62d AC_AttitudeControl: enhanced quaternion attitude controller 2016-06-24 17:17:11 +09:00
Leonard Hall 117ae89505 AC_AttitudeControl: increase SLEW_YAW default to 60deg/sec 2016-06-24 16:24:17 +09:00
Leonard Hall e0eecd56b2 AP_Math: use is_zero and float constants 2016-06-24 16:16:34 +09:00
Leonard Hall 7f933140c7 AP_Math: small formatting fix to quaternion rotation_matrix
No functional change
2016-06-24 16:16:33 +09:00
Leonard Hall 8afd29cc85 AP_Math: add quaternion::rotation_matrix_norm 2016-06-24 16:16:28 +09:00
Randy Mackay a1548405c1 AC_AttitudeControlHeli: fix althold lean angle max 2016-06-24 15:03:59 +09:00
Leonard Hall 75c4367cfc Copter: Change fabs to fabsf 2016-06-24 15:03:14 +09:00
Andrew Tridgell 1256c2f351 Plane: changed for AP_Vehicle API change 2016-06-24 11:39:23 +10:00
Andrew Tridgell 1f29b51dd6 AP_Vehicle: moved roll_limit_cd into AP_Vehicle
will be used by APM_Control
2016-06-24 11:39:21 +10:00
Andrew Tridgell 8a03b3ba22 APM_Control: reduce elevator when past LIM_ROLL_CD
this reduces elevator control when rolled over hard in fixed
wing. Using the elevator when on the side just caused earth frame yaw
and is counter productive. It can also prevent some aircraft from
recovering from inverted flight.
2016-06-24 11:28:18 +10:00
Andrew Tridgell a8e5255b90 autotest: look in parent directories for vehicle type in sim_vehicle.py
this allows eeprom.bin per vehicle type without using -v
2016-06-24 11:28:18 +10:00
Peter Barker 043b1d321d Copter: remove paths for documenation for non-multi frame
Our current documentation system only emits one XML document (apm.pdef.xml)
for ArduCopter.

Since there is a conflict between parameters in the MOT_ namespace in Copter,
we only emit the documentation for the first parameter defining the MOT_ namespace.

This patch removes the documentation lines for frame types other than multicopter, meaning the documentation will reflect mutlictopter usage - the most common case.

These lines will need to be reinstated when we change the way we produce the xml documentation.
2016-06-24 09:55:28 +09:00
Peter Barker 7742503ef3 Copter: include AC_AttitudeControl parameter documentation 2016-06-24 09:55:26 +09:00
Andrew Tridgell a6e927d434 SITL: default gyro cal off in XPlane and FlightAxis
pointless doing cal on these backends
2016-06-24 10:32:52 +10:00
Gustavo Jose de Sousa f9cb760691 AP_Mount: use ARRAY_SUBSCRIPT instead of bytes field
That fixed compilation issues and seems more semantically correct. Using array
of length 0 fails compilation because of -Werror=array-bounds in GCC 6.1.
2016-06-23 21:02:05 -03:00
Gustavo Jose de Sousa 174cefa8a5 AP_GPS: use ARRAY_SUBSCRIPT instead of bytes field
That fixed compilation issues and seems more semantically correct. Using array
of length 0 fails compilation because of -Werror=array-bounds in GCC 6.1.
2016-06-23 21:02:05 -03:00
Lucas De Marchi 1962acad49 AP_Common: simplify ARRAY_SUBSCRIPT macro
Add DEFINE prefix, since this macro is defining these operators and
remove the parameter since we will always use it to access a
union/struct as a byte array.
2016-06-23 21:02:05 -03:00
Gustavo Jose de Sousa 5154369e9d AP_Common: define the ARRAY_SUBSCRIPT macro 2016-06-23 21:02:05 -03:00
Andrew Tridgell 480cbcd87c mavlink: submodule update 2016-06-24 09:45:51 +10:00
Lucas De Marchi 4a18108600 AP_HAL_Linux: rename min, max and avg fields
These were probably named otherwise in order not to conflict with
min/max macros from math.h. We don't have this problem anymore.
2016-06-23 19:08:14 -03:00
Lucas De Marchi b8e3e549c7 AP_HAL_Linux: Perf: add debug method
Test code for integration with another thread to pull data from internal
perf counters.  Since we are using the timer thread here, there's no
retry mechanism and we only print that data can be corrupted.
2016-06-23 19:08:14 -03:00
Lucas De Marchi a9919420c6 waf: allow to disable libiio at configuration
We default to autodetection for libiio so if the libraries are available
we enable it. However this may not always be desired.
2016-06-23 19:08:13 -03:00
Lucas De Marchi 348678888b waf: allow to disable lttng at configuration
We default to autodetection for LTTNG so if the libraries are available
we enable it. However this may not always be desired.
2016-06-23 19:07:26 -03:00
Lucas De Marchi 1727418dc9 AP_HAL_Linux: Perf: make lttng use internal fields
Instead of creating a new object Perf_Lttng copying the necessaries
fields, just make a tighter integration with the internal perf counters
and re-use the same fields.
2016-06-23 19:06:30 -03:00
Lucas De Marchi 619ce23799 AP_HAL_Linux: Perf: rework integration with other tools
The idea is to leave the internal perf enabled all the time, like it is
in PX4, and then allow the integration with lttng on top. Next step
would be to runtime enable/disable only the perf counters we are
interested in.

This also changes the structure so it's easy to allow another thread to
pull data from the Perf object. A rw lock protects from addition of new
counters and an atomic unsigned int allows other threads to do a
lockless copy of the data.

In order for this to work the allocation was changed to use a single
memory pool instead of returning a calloc'ed data for each perf counter.
Since most of our counters are of ' elapsed' type, don't bother using a
smaller struct for the 'count' type
2016-06-23 19:06:30 -03:00