Commit Graph

17269 Commits

Author SHA1 Message Date
Andrew Tridgell
44b7c75a4c GCS_MAVLink: merged upstream mag cal messages for APM 2015-07-01 12:00:23 +10:00
tcr3dr
41e4c2720d AP_Param: Explicitly casts AP_CLASSTYPE parameter. 2015-07-01 11:32:11 +10:00
tcr3dr
9d26bc6958 HAL_SITL: Adds polyfill for feenableexcept on OS X. 2015-07-01 11:32:01 +10:00
tcr3dr
523acc1c54 AP_Menu: Corrects string null comparison in AP_Menu. 2015-07-01 11:31:54 +10:00
Tom Pittenger
457d3be4d7 AP_BoardConfig: add user-defined serial number
new param: BRD_SERIAL_NUM
// @Description: User-defined serial number of this vehicle, it can be any arbitrary number you want and has no effect on the autopilot
// @Range: -32767 to 32768 (any 16bit signed number)
2015-06-30 17:20:15 +10:00
Andrew Tridgell
281f6d9caa HAL_Linux: cope with expansion of storage from 4096 to 16k 2015-06-30 16:45:49 +10:00
Gustavo Jose de Sousa
87776d8a4b Storage: define LINUX_STORAGE_SIZE correctly
The value for LINUX_STORAGE_SIZE was defined inconsistently against the one
defined for Linux boards in HAL_STORAGE_SIZE. That led to some values not
being written to the storage when running the test binary built at
libraries/StorageManager/examples/StorageTest.
2015-06-30 16:37:08 +10:00
Peter Barker
4b0495bb15 Rover: use common mission logging code 2015-06-30 16:23:35 +10:00
Peter Barker
3fce7eb21a Plane: use common mission logging code 2015-06-30 16:23:35 +10:00
Peter Barker
12bce49cd1 Copter: use common mission logging code 2015-06-30 16:23:35 +10:00
Peter Barker
cabea266e7 DataFlash: pull out common mission logging code 2015-06-30 16:23:35 +10:00
Peter Barker
b0c6a1fde7 Rover: use common system information logging 2015-06-30 16:23:35 +10:00
Peter Barker
bbfe67fe2a Plane: use common system information logging 2015-06-30 16:23:34 +10:00
Peter Barker
52a31a31e0 Copter: use common system information logging 2015-06-30 16:23:34 +10:00
Peter Barker
d85b247706 DataFlash: Log_Write_SysInfo - pull out common logging startup messages 2015-06-30 16:23:34 +10:00
Peter Barker
8bbeedb158 Replay: flush dataflash log on floating point exception 2015-06-30 16:19:22 +10:00
Peter Barker
c5c39a77a3 DataFlash: method to flush ringbuffer to fd 2015-06-30 16:19:22 +10:00
Andrew Tridgell
686b1137fa AP_NavEKF: added vehicle specific initial gyro bias uncertainty 2015-06-30 16:16:26 +10:00
Andrew Tridgell
761b39be03 HAL_Linux: removed extra include 2015-06-30 15:09:52 +10:00
Andrew Tridgell
1296da56bb AP_Terrain: fixed terrain path handling 2015-06-30 15:08:10 +10:00
Andrew Tridgell
a3c7297d8e HAL_Linux: fixed setting of custom directories 2015-06-30 15:08:10 +10:00
Víctor Mayoral Vilches
f592981a60 TerrainIO: Support custom_terrain_directory 2015-06-30 14:36:43 +10:00
Víctor Mayoral Vilches
c06abeb02e DataFlash_File: Support custom_log_directory 2015-06-30 14:36:42 +10:00
Víctor Mayoral Vilches
2e7a4aa1e6 HAL_Linux: Implement custom dir. methods 2015-06-30 14:36:42 +10:00
Víctor Mayoral Vilches
e5a90c7a34 AP_HAL: Util, add custom terrain and log methods 2015-06-30 14:36:00 +10:00
Víctor Mayoral Vilches
5c4ae15deb HAL_Linux: Make use of GetOptLong
Use GetOptLong to process long args, support
custom terrain and log directories and update
_usage().
2015-06-30 14:36:00 +10:00
Víctor Mayoral Vilches
309511dc08 HAL_Linux: UARTDriver, const device_path
Class member set to const and set_device_path
accepts a const char* now.
2015-06-30 14:36:00 +10:00
Víctor Mayoral Vilches
790f4ec56c HAL_Linux: Util fix indentation 2015-06-30 14:35:59 +10:00
Andrew Tridgell
34689cf949 autotest: cope with mavproxy logging msg changes 2015-06-30 14:06:17 +10:00
Andrew Tridgell
ac3200fd32 AP_InertialSensor: make max_abs_offsets a single float, not a vector 2015-06-30 10:51:43 +10:00
Gustavo Jose de Sousa
0fcd98c804 AP_InertialSensor: disable debug on LSM9DS0 2015-06-30 10:28:05 +10:00
Gustavo Jose de Sousa
c168e19e73 AP_InertialSensor: fix coding style with uncrustify on LSM9DS0
This commit makes backend source code for LSM9DS0 comply with the configuration
files "uncrustify_cpp.cfg" and "uncrustify_headers.cfg".
2015-06-30 10:28:02 +10:00
Gustavo Jose de Sousa
2f2a627002 AP_InertialSensor: use runtime GPIO drdy pins numbers instead C constant macros
As we intend to eventually get board related parameters from a configuration
file, this commit makes the GPIO numbers for data-ready pins be instance
variables instead of from C constant macros.

Another advantage of using instance variables in this context is the
possibility of using more than one LSM9DS0.
2015-06-30 10:27:59 +10:00
Gustavo Jose de Sousa
0ef914adac AP_InertialSensor: don't take SPI semaphore if not necessary on LSM9DS0
If the data-ready polling is done entirely on GPIO pins, it isn't necessary to
hold the semaphore before we now we have data to consume. In that case, only
take the SPI semaphore if there's new data available.

On the other hand, if at least one SPI transaction is done in order to check
for new data, then it makes sense to take the semaphore beforehand.
2015-06-30 10:27:57 +10:00
Gustavo Jose de Sousa
a82ab25ed3 AP_InertialSensor: use bitfield macros instead of literal values on LSM9DS0
This commit makes accel and gyro initialization routines use bitfield macros
instead of hardcoding the literal value when wrinting on registers. That is
less prone to typos and a lot of times self-explanatory. Also, due to the
latter, the long comments explaining each register field were removed (any
detail can be checked on the datasheet).
2015-06-30 10:27:54 +10:00
Gustavo Jose de Sousa
1572324315 AP_InertialSensor: add macros for LSM9DS0 registers' bitfields 2015-06-30 10:27:51 +10:00
Gustavo Jose de Sousa
033409c629 AP_InertialSensor: set max abs calibration offset for LSM9DS0 2015-06-30 10:27:48 +10:00
Gustavo Jose de Sousa
42eb73a1d1 AP_InertialSensor: add LSM9DS0 backend
This adds the backend driver for LSM9DS0. This implementation is based on the
legacy driver coded by Víctor Mayoral Vilches (under folder LSM9DS0) and makes
some necessary adaptations and fixes in order to work properly. The legacy
driver folder was removed.
2015-06-30 10:27:46 +10:00
Gustavo Jose de Sousa
c340e072f2 AP_InertialSensor: use accel instance max abs offset instead of a constant value
The calibration on LSM9DS0 was giving offsets between 4.0 and 4.2 on x-axis and
around 3.6 on y-axis. It turned out that those offsets were actually right.

The maximum absolute values of calibration offset should be a sensor
characteristic rather than a constant value for all sensors.

The constant value previously used (3.5 m/s/s for all axes) is set here as a
default maximum absolute calibration offset for every instance to keep it
working.
2015-06-30 10:27:44 +10:00
Lucas De Marchi
623c5f0713 AP_HAL_Linux: check if I2C device is chardev 2015-06-30 09:10:54 +10:00
Lucas De Marchi
acc571c2c5 AP_HAL_Linux: add function to check if path is chardev
Utility function to allow checking if a certain path is a character
device.
2015-06-30 09:10:54 +10:00
Lucas De Marchi
a4c1b0d75f AP_HAL_Linux: add constructor to find I2C bus reliably
The device number in /dev may not be reliable from one boot to another
due to the initialization order of each bus.

For example, in Minnow Board Max, the exposed I2C buses may be i2c-7 and
i2c-8 or i2c-8 and i2c-9 depending if the platform driver in the kernel
is initialized before or after the PCI.

It also may change with different version and configuration of the DT or
UEFI used making another kernel driver to bind to the device. This means that
for Minnow Board Max we need to use something like below to pass to the
constructor:

	static const char * const i2c_devpaths[] = {
	    /* UEFI with lpss set to ACPI */
	    "/devices/platform/80860F41:05",
	    /* UEFI with lpss set to PCI */
	    "/devices/pci0000:00/0000:00:18.6",
	     NULL
	};

The devpath here is the one returned by udev with the following command:

	udevadm info -q path /dev/<i2c-device>

In contrary to the device number in /dev/i2c-N, this path in sysfs is
stable across reboots and can only change if there's a change in the
UEFI firmware or the board's device tree.

This patch assumes the currently supported boards don't have this
problem so it's not touching them.
2015-06-30 09:10:54 +10:00
Lucas De Marchi
ec5d0b6c08 AP_HAL_Linux: reorder members and methods and use C++ initializer 2015-06-30 09:10:53 +10:00
Michael du Breuil
a382ce2b0c AP_GPS: Add support for logging ublox RXM-RAWX messages
Can only record 32 satellites raw info before memory corruption occurs. (And raised the limit on normal RXM-RAW messages to 22)
2015-06-30 09:05:49 +10:00
Michael du Breuil
d665c85c20 DataFlash: Add RXM-RAWX logging messages 2015-06-30 09:05:48 +10:00
mirkix
38a8a772f8 AP_GPS: Add fix status 3D+DGPS 2015-06-30 09:00:31 +10:00
Andrew Tridgell
15efae5a48 HAL_SITL: use SITL_NUM_CHANNELS 2015-06-30 08:55:02 +10:00
Andrew Tridgell
f8944ab6be SITL: define number of RC out channels 2015-06-30 08:54:46 +10:00
Vladislav Zakharov
be4b6033e4 AP_HAL_Linux: Navio RCInput reimplemented. 2015-06-29 16:45:43 +10:00
Vladislav Zakharov
e505eb2cd8 AP_HAL_Linux: Changes in Scheduler: Added defines for delays, RCIN_RERIOD changed 2015-06-29 16:45:42 +10:00