Gustavo Jose de Sousa
d3eebdb6aa
AP_InertialSensor: L3G4200D: add probe code
...
This driver works properly but had the initialization logic missing. Add
the support to probe it.
2015-08-08 14:12:22 +10:00
Lucas De Marchi
55279664c2
AP_InertialSensor: remove out of place ifdef
...
AP_InertialSensor isn't a good place to comment about board issues.
2015-08-08 14:12:21 +10:00
Lucas De Marchi
2e76d998df
AP_InertialSensor: remove unused enum bus_speed
...
The methods actually use the enum from AP_HAL::SPIDeviceDriver, so don't
declare a new one. The I2C implementation is empty; if we actually start
to use it we'd better move the bus abstraction to HAL.
2015-08-08 14:12:21 +10:00
Lucas De Marchi
f3f54157be
AP_InertialSensor: fix copying wrong number of bytes
...
We should copy only the bytes we read, not the maximum number.
2015-08-08 14:12:21 +10:00
Lucas De Marchi
209e1924a5
AP_InertialSensor: fix whitespace usage
2015-08-08 14:12:21 +10:00
Michael du Breuil
bc26eaab63
AP_GPS: Ublox: fall back to the DOP if hDOP hasn't come in yet
...
Provides a stable fallback, and can be considered fairly safe from the perspective that it provides a worse value then the hDOP under almost all scenarios.
2015-08-07 21:21:48 +10:00
Lucas De Marchi
3851862f60
AP_InertialSensor: remove unused drivers
...
Nobody is using these drivers, they need to be rewritten using the
backend logic and give the false impression they are supported.
2015-08-07 20:57:49 +10:00
Gustavo Jose de Sousa
0d1d960899
StorageManager: remove unnecessary calculations on addr for next area
...
When writting or reading a block, if the block doesn't fit the area where it begins, the next base address is always zero. Thus the calculations to define the next value of addr are unnecessary.
Here's a quick validity proof using the previous calculations:
First: Considering the case where the block doesn't fit it's first area:
That means that (count + addr > length), what makes:
count = length - addr; (1)
So the following operations:
addr += count;
addr -= length;
Are the same as doing:
addr = addr + count - length; (2)
Using (1) and (2) we have:
addr = addr + length - addr - length = 0
Second: When the block fits the area where it's at:
That means that variable count is not changed,
thus (n -= count) evaluates to 0, which makes the loop exit.
Another change was (b += count;) being moved after the condition to break the loop, since we just need to move the block pointer when it doesn't fit the first area.
2015-08-07 20:52:20 +10:00
Randy Mackay
f009c2ddb9
Motors_Multicopter: add MOT_THR_MIX_MAX parameter
...
Allows controlling the prioritisation of throttle vs attitude control
during active flight
2015-08-07 17:39:09 +09:00
Randy Mackay
4aef64c153
OpticalFlow_Linux: reworked driver
...
remove PANICs from init
return semaphore if init fails
add successful initialisation check before attempting to read from sensor
structure made private where possible
formatting fixes
check I2C reads succeed
add request_measurement to request sensor to produce measurement
quit after 20 of previous 40 reads fail
throttle reads to 10hz max
2015-08-07 15:51:11 +09:00
Víctor Mayoral Vilches
ed3366aaae
AP_OpticalFlow: Add support for Linux
...
Add a Linux userspace driver for the PX4FLOW sensor.
2015-08-07 15:50:41 +09:00
Randy Mackay
42c7b4a116
BattMon_SMBus: remove unnecessary I2C semaphore give
2015-08-07 15:50:38 +09:00
Randy Mackay
66469d7529
Compass_HMC5843: remove unnecessary i2c semaphore give
2015-08-07 15:50:36 +09:00
Randy Mackay
5776620062
DataFlash: consolidate GPS, GPS2 messages
...
Remove unused dgps_numch, dgps_age from GPS2
Add U field (for use) to both GPS and GPS2
2015-08-05 15:46:46 +09:00
Andrew Tridgell
7e2e78c1af
AP_AHRS: protect against zero deltat in DCM
...
fixes issue #2657
2015-08-05 15:21:00 +10:00
Randy Mackay
a81d756ce1
AC_WPNav: remove unused definitions
2015-08-05 14:14:55 +09:00
Randy Mackay
fb9cc124c8
AC_WPNav: replace hardcoded 0.02 with pos_control dt
2015-08-05 14:14:54 +09:00
Leonard Hall
8195f45d6c
AC_WPNav: fix spline height loss
2015-08-05 14:14:49 +09:00
Michael du Breuil
c704102dcd
AP_GPS: Default the value of hdop to 99.99 if no value has been read yet.
2015-08-04 22:10:02 +09:00
Randy Mackay
136853a750
Rally: rename RALLY_HOME_INC param to INCL_HOME
...
Also default include-home to 1 only for copter
Also minor formatting and comment changes
2015-08-04 21:25:44 +09:00
KiwiHC16
e0e2ed519c
Rally: add RALLY_HOME_INC param to use Home as a Rally point
2015-08-04 21:25:41 +09:00
Julien BERAUD
39b42a4e6e
AP_Compass_AK8963: suspend timer while reading
...
Protection in case a timer falls while reading data, because it could end up
with corrupted data
2015-08-03 22:50:08 +09:00
Julien BERAUD
0aa2fe7a0b
AP_Compass_AK8963: fix sem handling
...
In case of error or zeroed data, the i2c semaphore wasn't given.
It happened at first startup on Bebop and caused a failure:
"PANIC: failed to take _bus->sem 100 times in a row..."
2015-08-03 20:57:46 +09:00
Leonard Hall
1a583c5382
AP_Motors: calc_roll_pwm based on throttle pwm range
2015-08-03 14:12:49 +09:00
Randy Mackay
9067abc037
AHRS_NavEKF: fix blended accel to use primary accel
2015-08-01 17:19:45 +09:00
Randy Mackay
7d2c0079ff
Terrain: set HAL capabilities bit
2015-07-31 14:50:26 +09:00
Randy Mackay
d0aa1a89cd
GCS_MAVLink: retrieve capabilities from HAL
2015-07-31 14:50:22 +09:00
Randy Mackay
810973ce95
HAL: define capability bitmask
2015-07-31 14:50:19 +09:00
squilter
c946ce72e8
GCS_MAVLink: add optional param to support capability bitmask
2015-07-31 14:50:10 +09:00
Andrew Tridgell
212898d02b
AP_InertialSensor: don't use INT_STATUS drdy to lower SPI bus speed
...
as pointed out by Lucas in PR#2604 this is probably a bad idea
2015-07-30 14:05:20 +10:00
Grant Morphett
538a077ae8
SITL: fix coverity warning - removed unused variable heli_servos
2015-07-30 12:37:09 +10:00
Grant Morphett
08f5305519
DataFlash: fix coverity warnings - add param init in constructor
2015-07-30 12:37:09 +10:00
Grant Morphett
e2eda97ec6
AP_InertialSensor: fix coverity warnings - param init in construct
2015-07-30 12:37:08 +10:00
Grant Morphett
312184dd13
AP_Baro: coverity fixes - add param init in constructor
2015-07-30 12:37:08 +10:00
Andrew Tridgell
087e729748
AP_GPS: re-enable SBAS config on APM2 for uBlox
2015-07-30 11:04:31 +10:00
Andrew Tridgell
9c776736c1
AP_AHRS: use delta_velocity and delta_angle in DCM
...
this prevents an aliasing effect by using the correct delta velocity
time value for each accelerometer sample used
2015-07-30 11:04:31 +10:00
Andrew Tridgell
b6beeb6f2f
AP_GPS: save some memory and code space on APM2 for ublox
...
don't include structures we don't need for low end CPUs
2015-07-30 08:46:20 +10:00
Randy Mackay
8aa7a3cffc
GPS: suppress compile warning
2015-07-29 16:53:18 +09:00
Randy Mackay
be6089e903
GPS: fix compile warning for NMEA logging
2015-07-29 16:53:16 +09:00
Randy Mackay
5732a6a144
Baro: update climb rate only if healthy
2015-07-29 16:32:49 +09:00
Andrew Tridgell
45a7c37734
HAL_Linux: added bcast flag for udp broadcast
2015-07-29 16:46:53 +10:00
Andrew Tridgell
eca0940bc7
AP_HAL: allow for broadcast packets on UDP IPv4
2015-07-29 16:46:33 +10:00
Andrew Tridgell
17b5d54f6b
GCS_MAVLink: use a larger log send queue for Linux
...
often on UDP or TCP with more bandwidth
2015-07-29 14:19:47 +10:00
Andrew Tridgell
3e4b0b9869
AP_HAL: added pollout() function to socket API
2015-07-29 14:19:46 +10:00
Andrew Tridgell
b99740cb93
HAL_Linux: sped up UDP transfers by about 25x
...
allow more than 1 packetised transfer per tick
2015-07-29 14:19:46 +10:00
Andrew Tridgell
25fe2b3fb0
AP_GPS: added optional NMEA debug log
...
compile time option for debugging
2015-07-29 11:07:01 +10:00
Andrew Tridgell
a5c7aa1b19
HAL_Linux: allow startup before network bringup
...
this makes it possible to bootup ardupilot before the desired network
interface is available. This is very useful for when using 3G dongles
in aircraft
2015-07-29 09:55:47 +10:00
Andrew Tridgell
55fc66ec65
HAL_Linux: implemented TCP server as a single driver
...
the wait flag just changes startup behaviour. The TCP server should
always be a server with listen and accept. We don't need two drivers
2015-07-29 09:37:57 +10:00
Andrew Tridgell
596ecde70d
AP_HAL: added listen and accept APIs to socket API
2015-07-29 09:07:41 +10:00
Andrew Tridgell
b07f7e873f
AP_HAL: added pollin() interface for Socket API
2015-07-29 08:58:02 +10:00