Commit Graph
46 Commits
Author SHA1 Message Date
Lorenz Meier c2f97e628c L3GD20 driver: stack size adjustments of start handler and start return review / comments 2014-07-16 07:51:47 +02:00
Lorenz Meier 812d326912 L3GD20: Fix usage function call to fit existing structure. 2014-07-08 13:52:42 +02:00
Andrew Tridgell 4271634585 l3gd20: fixed a build warning 2014-07-08 12:03:09 +02:00
Andrew Tridgell a049f0841d Merged L3GD20 orientation flag while keeping original bus speed 2014-07-08 11:56:45 +02:00
Andrew Tridgell e7360f4016 l3gd20: added -X switch for external bus 2014-07-08 11:44:06 +02:00
Ash Charles cbc559b6d6 [l3gd20] Make gyro orientation board-overridable
As discussed [1], provide a default SENSOR_BOARD_ROTATION
(270 degrees as this seems most common) and let boards override it
as necessary.

[1] https://github.com/gumstix/m4-firmware/commit/7d0850a710b3ac9e9e165beb36389577d0e5adcb#commitcomment-6315550

Signed-off-by: Ash Charles <ashcharles@gmail.com>
2014-05-14 09:19:30 -07:00
Ash Charles 7d0850a710 [l3gd20] Style fixes for l3g4200d integration
As requested here [1], this fixes some of the style errors
introduced with the addition of l3g4200d support to the l3gd20
driver.  Gyro orientation is set conditionally for the aerocore
board.

[1] https://github.com/PX4/Firmware/pull/937

Signed-off-by: Ash Charles <ashcharles@gmail.com>
2014-05-13 14:00:44 -07:00
Ash Charles 3b72e31e83 [l3gd20] Add support for L3G4200D chip
The L3G4200D chip is very similar to the L3GD20[H] parts and can use
the same driver with minor adjustments.  There are four differences:
 * WHO_AM_I register is 0xD3 (not 0xD4 or 0xD7):
   - added an extra case to the driver probe
 * Sampling rates are marginally different:
   - setting sampling rate now depends on the detected chip
 * I2C address range is different:
   - no changes as the driver doesn't support i2c access
 * the L3G4200D has a self-test function:
   - no changes---chose not to implement feature in driver

Signed-off-by: Ash Charles <ashcharles@gmail.com>
2014-05-13 10:01:17 -07:00
Lorenz Meier d199710651 Fixed up init sequence of all sensors - we can publish in interrupt context, but not advertise! All advertisements now contain valid data 2014-01-14 15:40:46 +01:00
Lorenz Meier 3c7766db6c Support for publication blocking: L3GD20(H) 2014-01-12 11:54:10 +01:00
Lorenz Meier f4ac204f46 Cranking up bus speeds for all sensors to achievable 10.4 MHz, will cut the bus lock time to half 2013-12-15 18:32:46 +01:00
Andrew Tridgell 8f90efa312 l3gd20: print more perf counters and make DRDY usage clearer 2013-12-13 11:19:18 +01:00
Andrew Tridgell 17502cbde4 l3gd20: fixed a warning 2013-12-13 11:18:59 +01:00
Andrew Tridgell 893d66d961 l3gd20: added rescheduling and error checking 2013-12-10 11:40:06 +01:00
Andrew Tridgell 1bac7e7f8b l3gd20: close fds before exit 2013-12-10 11:39:07 +01:00
Andrew Tridgell 5a88dc02a7 l3gd20: use register_class_devname() 2013-12-10 11:38:10 +01:00
Lorenz Meier eed5b99a4a Merge branch 'redundant_sensors' of github.com:PX4/Firmware 2013-12-10 11:37:25 +01:00
Andrew Tridgell 86ec1c37fa l3gd20: added retries to disable_i2c() 2013-12-10 11:03:12 +01:00
Andrew Tridgell 476070510e lsm303d/l3gd20: change filters to 50Hz analog on-chip filters
after discussion with Leonard these analog on-chip filters should be
at 50Hz
2013-12-10 11:02:49 +01:00
Lorenz Meier 7becbcdbd5 Made all usual suspects default to their custom names and only register the default name if its not already taken by someone else 2013-12-07 10:34:32 +01:00
Andrew Tridgell edc5b68499 l3gd20: use highest possible on-chip filter bandwidth
this allows the software filter to do its job properly
2013-12-04 07:08:23 +01:00
Andrew Tridgell cb76f07d31 l3gd20: added I2C disable based on method from ST engineering support 2013-11-30 20:20:23 +11:00
Lorenz Meier 90c4664dce Merged status changes 2013-10-06 14:17:37 +02:00
px4dev 19fdaf2009 Use the generic device::SPI locking strategy. 2013-09-12 23:56:53 -07:00
Andrew Tridgell 4893509344 drivers: report error_count in drivers where possible 2013-09-12 09:26:49 +02:00
px4dev cefc7ac00e Rework the ringbuffer class so that it's not templated, and refactor its clients so they aren't dancing around the linker anymore. 2013-09-12 00:53:08 +02:00
Andrew Tridgell 63fb702d7f l3gd20: convert to using RingBuffer class 2013-09-12 00:52:31 +02:00
Lorenz Meier 3a326cb467 Guard probe / reset against other SPI drivers 2013-09-11 22:16:29 +02:00
Andrew Tridgell fdbc09e2a5 avoid counters going above limit in INCREMENT()
when using INCREMENT() the counter would temporarily read equal to
limit, which could cause an issue if the task is preempted.

(this macro should be in a common header, though which header?)
2013-08-28 11:16:30 +02:00
Julian Oes 1ede95d252 L3GD20 and LSM303D reset and range config working properly now 2013-08-21 14:21:54 +02:00
Lorenz Meier 2a58929ffd Merge branch 'master' of github.com:PX4/Firmware into fmuv2_bringup 2013-08-20 16:26:15 +02:00
Lorenz Meier 05e4c086ce Added orientation support and detection to the L3GD20/H driver to support the different variants in use 2013-08-16 16:24:44 +02:00
Lorenz Meier cbb5ce8f59 Fixed startup behavior for PX4 autostart 2013-08-11 16:54:00 +02:00
Lorenz Meier dccdc977d5 Made accel / gyro self tests aware of offsets and scales, added support to config command to call these 2013-08-09 17:56:32 +02:00
Andrew Tridgell 547a747752 Merged commit disabling FIFO in L3GD20 2013-08-07 15:40:43 +02:00
Lorenz Meier ca9a11a586 Indendation fixes 2013-08-05 23:09:02 +02:00
Andrew Tridgell 83189a85da l3gd20: disable the FIFO
the FIFO was not gaining us anything, and was adding latency. If we
use the FIFO we'd need to do multiple SPI transfers to ensure it is
drained
2013-08-04 16:13:48 +02:00
Andrew Tridgell a87690d0e2 Added L3GD20 lowpass 2013-08-04 15:46:41 +02:00
px4dev 9d6ec6b365 Restructure things so that the PX4 configs move out of the NuttX tree, and most of the PX4-specific board configuration data moves out of the config and into the board driver.
Rename some directories that got left behind in the great board renaming.
2013-08-02 22:34:55 -07:00
Andrew Tridgell a9c1882ea0 l3gd20: fixed bit definitions for filter rates
and allow requests for the rates in table 21 of the l3gd20H datasheet
2013-08-02 16:35:54 +02:00
Julian Oes 7e9a18da79 Changed gyro scaling according to datasheet 2013-07-30 18:20:31 +02:00
Lorenz Meier c8aca814ca Improved comments 2013-07-16 12:46:23 +02:00
Lorenz Meier 6902177b99 Default to 2000 dps for L3GD20 2013-07-16 12:45:43 +02:00
Sam Kelly 53f29a25b6 Added l3gd20h detection 2013-06-13 12:51:50 -07:00
Lorenz Meier e6ed8268ee Moved position_estimator_mc, px4io driver and sdlog app to new style build 2013-04-27 12:59:47 +02:00
px4dev 01e427b17c Merge working changes into export-build branch. 2013-04-26 16:14:32 -07:00