Commit Graph

17693 Commits

Author SHA1 Message Date
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
Przemek Lekston
90378b21da AP_BattMonitor: Fix battery monitor Floating Point Exception in SITL
Adds a sanity check to avoid division by zero when BATT_CAPACITY is set to 0.
2015-06-29 16:42:52 +10:00
Andrew Tridgell
2291a8994e Replay: fixed build 2015-06-29 15:59:53 +10:00
Andrew Tridgell
16ada34398 build: removed include of vehicle directory in build
this removes the temptation of including vehicle specific headers in
libraries
2015-06-29 15:34:43 +10:00
Randy Mackay
d89058a75c Copter: loiter state reads takeoff climb rate during takeoff 2015-06-29 13:49:58 +09:00
Robert Lefebvre
01ae84dda6 Copter: Create Loiter state machine. 2015-06-29 13:49:55 +09:00
Andrew Tridgell
ff88932091 SITL: setup turbulence in JSBSim 2015-06-29 11:25:59 +10:00
Andrew Tridgell
92c9779d18 HAL_SITL: pass turbulence to simulators 2015-06-29 11:25:44 +10:00
Randy Mackay
1a9cdac441 Copter: remove unused definition 2015-06-28 21:55:31 +09:00
Randy Mackay
cc212f1398 Copter: AC3.3-rc7 release notes 2015-06-28 21:21:05 +09:00
Andrew Tridgell
8fb879a25b PX4Firmware: submodule update 2015-06-27 21:25:09 +10:00
Randy Mackay
e60f53d144 Copter: arming check Bitmask param description 2015-06-27 19:20:52 +09:00
Randy Mackay
2b35fbc81f Copter: remove redundant ToRad definition 2015-06-27 19:20:50 +09:00
Randy Mackay
ef20676c67 GPS: fix INJECT_TO param desc and add definition
No functional change
2015-06-27 16:31:03 +09:00
Randy Mackay
0264b1aa84 AC_Circle: set only xy position targets 2015-06-27 15:43:49 +09:00
Randy Mackay
0b9c7c2a3b SerialManager: add SToRM32 to protocol param description 2015-06-27 11:18:17 +09:00
Víctor Mayoral Vilches
ab5f1b3a24 BusTest: Fix compilation error with AP_ADC 2015-06-26 21:59:22 +10:00
Tom Pittenger
b7e12214ed .gitignore update for jsbsim changes
It seems jsbsim has changed the filenames and the location of _fgout.xml and rascal_test.
I'm not sure if this is a mistake or new behavior but either way these files are generated and don't need to be tracked.
2015-06-26 21:58:27 +10:00
Andrew Tridgell
3d2fcfaebd Maintainers: add Peter as DataFlash maintainer 2015-06-26 16:08:38 +10:00
Peter Barker
e9e59e6c38 Rover: DataFlash frontend/backend split 2015-06-26 16:02:51 +10:00
Peter Barker
788faf1f7d Copter: DataFlash frontend/backend split 2015-06-26 16:02:50 +10:00
Peter Barker
7f0a0cf64f Plane: DataFlash frontend/backend split 2015-06-26 16:02:50 +10:00
Peter Barker
2266f118e9 Replay: DataFlash frontend/backend split 2015-06-26 16:02:50 +10:00
Peter Barker
723c37bcf7 DataFlash: backend/frontend split 2015-06-26 16:02:50 +10:00
Andrew Tridgell
21c8a2d94a AP_Common: override new and delete on all platforms to zero memory
this guarantees that all classes get zero initial members when
they are dynamically allocated.
2015-06-26 15:55:19 +10:00
Andrew Tridgell
f2756ecb22 Replay: added checking of solution 2015-06-26 15:55:19 +10:00
Andrew Tridgell
9016a3d3db Replay: added --chek-generate option
adds CHEK messages based on current estimates
2015-06-26 15:55:18 +10:00