Commit Graph

24142 Commits

Author SHA1 Message Date
Lucas De Marchi 1f96336f7c Global: rename bus type enum entries 2016-06-27 17:51:41 -03:00
Gustavo Jose de Sousa f6bebc96c0 AP_InertialSensor: INS_generic: remove unused includes 2016-06-27 17:22:43 -03:00
Gustavo Jose de Sousa e85ac8b2c5 AP_InertialSensor: inform maximum gyro average difference
While at it, define GYRO_INIT_MAX_DIFF_DPS.
2016-06-27 17:22:43 -03:00
Gustavo Jose de Sousa e6f62080f5 AP_InertialSensor: fix best_diff on gyro initialization
Without this patch, if accel_diff.length() > 0.2f and j == 0, then
best_diff[k] would be zero forever since diff_norm[k] >= 0 for any j.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa de94392759 AP_InertialSensor: MPU9250: remove _bus_type field
Use _dev->bus_type instead.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa 83feb2e2ae AP_InertialSensor: MPU9250: let Device handle read flag
There's no need to handle that in MPU9250 anymore.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa 1e99a7125c AP_InertialSensor: MPU9250: remove _register_write_check()
That function isn't used in the code base and there should be a better way to
debug writes on registers.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa a6e5eb9e14 AP_InertialSensor: MPU6000: remove _bus_type field
Use _dev->bus_type instead.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa 0718649c8b AP_InertialSensor: MPU6000: let Device handle read flag
There's no need to handle that in MPU6000 anymore.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa 309fe4a88c AP_InertialSensor: MPU6000: remove _register_write_check()
That function isn't used in the code base and there should be a better way to
debug writes on registers.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa d35cf60ce1 AP_HAL_Linux: I2CDevice: use read flag in read_registers_multiple
Use the generic support in Device interface for read flag when we are
using read_registers_multiple() method.
2016-06-27 17:20:46 -03:00
Gustavo Jose de Sousa 66f1ad9ed0 AP_HAL: Device: add support for read flag
Many of our SPI and I2C sensors define the protocol of setting the most
significant bit of the register address in order to perform a read operation.
Thus, enable the use of a "read flag" that is ORed with the register's address.
Since this is an abstraction for general devices, it's a good idea to have zero
as the default value for that flag.

While at it, add documentation to read_registers().
2016-06-27 17:18:35 -03:00
Gustavo Jose de Sousa b6a1d598e3 AP_HAL: Device: document write_register() 2016-06-27 17:18:35 -03:00
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