Commit Graph
67 Commits
Author SHA1 Message Date
Andrew Tridgell 618d51dab1 hmc5883: fixed build errors with gcc 2.7.4 and -O3 2015-02-16 06:54:05 +01:00
Lorenz Meier 1e6bec6c77 HMC5883: Always report as internal sensor in SPI mode, since the sensor is fixed to the autopilot assembly. 2015-02-15 19:52:02 +01:00
Grant Morphett 215e8e2466 hmc5883: Fix for Issue1858 detection of MAG on Int/Ext I2C Bus. 2015-02-11 12:49:56 +01:00
Lorenz Meier 97ec21675c HMC driver: Return value handling 2015-02-09 22:56:24 +01:00
Lorenz Meier c9957903e9 HMC5883: Move to 0-based index 2015-02-09 22:56:22 +01:00
Lorenz Meier f30b02272b Move HMC5883 to new interface 2015-01-29 16:33:52 +01:00
Daniel Agar 9f32a85409 Fixed coverity CID #12530 2015-01-22 15:02:43 +01:00
Andrew Tridgell 9b10395e94 hmc5883: fixed DEVIOCGDEVICEID ioctl
we need to pass the ioctl through to the bus interface

thanks to Jon Challinger for noticing this bug
2015-01-20 15:08:22 +11:00
Andrew Tridgell 0af6303d0b hmc5883: fixed mixup of internal and external hmc5883 I2C bus options 2015-01-20 14:30:46 +11:00
Andrew Tridgell 54a22aed94 hmc5883: fixed handling of 3 bus options
use a table of possible bus options. This prevents us starting two
drivers on the same bus
2015-01-09 19:42:27 +11:00
Lorenz Meier dc7ee4247f HMC5883 startup: Ensure sensor configuration is always performed 2015-01-03 17:54:49 +01:00
Lorenz Meier 268cf7efc5 HMC5883: Fix I2C operation 2015-01-03 17:54:48 +01:00
Lorenz Meier dd165100fb Support for HMC5983, which can also be attached via SPI 2015-01-03 17:54:48 +01:00
Lorenz Meier 9d986f5df3 HMC5883: Better status reporting 2014-11-26 18:22:18 +01:00
Lorenz Meier 54f296ce9d Sensor drivers: Optimize for size 2014-11-15 13:54:01 +01:00
Lorenz Meier ea0a59f806 HMC5883: Reduce output, add indices to make back-tracking lines easier, remove output completely for an OK-operation (the driver is NOT the right place to talk to the user!) 2014-11-10 09:26:11 +01:00
muharred 690843c53a Reset excitement mode for hmc5883 sensor before applying a new one to avoid getting reserved 11 bits set in case of a set_excitement(1) call following a set_excitement(-1) call. 2014-08-20 13:06:39 +03:00
Lorenz Meier c5e4f33bb3 Merge sensor_startup_cleanup 2014-07-16 15:26:22 +02:00
Lorenz Meier 11eeb7466d Merge branch 'ext_mag_param' into logging 2014-07-16 15:00:58 +02:00
Lorenz Meier 0c5ce3d3a2 Hotfix: Allow the HMC5883 driver to continue to operate in auto mode 2014-07-16 13:42:47 +02:00
Lorenz Meier e68200b4ba HMC driver: Full initialization 2014-07-16 08:53:47 +02:00
Lorenz Meier f89573a6ed HMC5883 driver: stack size adjustments of start handler and start return review / comments 2014-07-16 07:51:24 +02:00
Lorenz Meier 5ef4e08c58 hmc5883: Support for three sensors 2014-07-15 23:14:30 +02:00
Lorenz Meier f02ddc3326 Do not initialize variable if value is never read 2014-07-15 22:08:40 +02:00
Lorenz Meier e696ed5509 Merged master 2014-07-15 22:07:03 +02:00
Andrew Tridgell 005dd206d1 hmc5883: periodically check the config and range registers
this copes with I2C comms errors causing the range or config registers
to become corrupted, leading to bad reading. This is easily
reproducible with a 1.3m I2C cable in the same run of cable as a GPS
UART cable. The error happens every half hour or so.

Conflicts:
	mavlink/include/mavlink/v1.0
	src/drivers/hmc5883/hmc5883.cpp
2014-07-12 19:04:25 +02:00
Andrew Tridgell 30a6a3d0b6 hmc5883: setup device type 2014-07-12 16:25:57 +02:00
Lorenz Meier a6b52f1c9f HMC5883 post merge cleanup 2014-07-08 13:49:24 +02:00
Andrew Tridgell 1c6ea06790 hmc5883: fixed build warnings 2014-07-08 12:03:02 +02:00
Andrew Tridgell dfee93f3b1 hmc5883: fixed driver startup when trying both buses 2014-07-08 12:02:53 +02:00
Andrew Tridgell 5e62ae7a9e hmc5883: added -C option to calibrate on startup
Conflicts:
	src/drivers/hmc5883/hmc5883.cpp
2014-07-08 12:01:50 +02:00
Andrew Tridgell d952e81ab7 added support for two instances of hmc5883 driver 2014-07-08 12:00:20 +02:00
Andrew Tridgell d2487e7718 hmc5883: added support for -R rotation option 2014-07-08 11:57:02 +02:00
Don Gagne 92adbe9216 Fix compiler warnings 2014-06-29 17:47:24 -07:00
Lorenz Meier dc2df309cb Introduce HMC5883 multi-device support 2014-06-10 15:05:50 +02:00
Lorenz Meier be6b9a1b36 hmc5883: Change static topic publication to the class member it should be, initialize collect phase (linter find) 2014-05-13 08:05:36 +02:00
Lorenz Meier 071f9c648b HMC5883: Do not spam the console on error and make everything worse. 2014-04-20 21:42:10 +02:00
Andrew Tridgell 30d1ce3a51 hmc5883: properly reset mag to normal state on calibration fail
and add current output in "hmc5883 info"
2014-04-05 12:11:52 +02:00
Lorenz Meier 773f70a9df Merged origin/master into pubsub_cleanup 2014-02-09 16:04:32 +01:00
Andrew Tridgell dda50c62bf hmc5883: much faster calibration code with bug fixes
this fixes two bugs in "hmc5883 calibrate" and also makes it much
faster, so it can be run on every boot. It now uses the correct 2.5Ga
range when calibrating, and fixes the expected values for X/Y/Z axes

The basic calibration approach is similar to the APM2 driver, waiting
for 10 good samples after discarding some initial samples. That allows
the calibration to run fast enough that it can be done on every boot
without causing too much boot delay.
2014-01-23 21:40:29 +01:00
Lorenz Meier 28a3dc726f Support for publication blocking: HMC5883 2014-01-12 11:53:56 +01:00
Andrew Tridgell 5ee41bc083 hmc5883: use register_class_devname() 2013-12-10 11:37:59 +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
Lorenz Meier 90c4664dce Merged status changes 2013-10-06 14:17:37 +02:00
Lorenz Meier 24648b5294 Minor cleanups in the drivers 2013-09-13 10:16:32 +02: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 3c45261117 hmc5883: use a RingBuffer to hold report queue
this simplifies the queue handling, and avoids the need for a
start()/stop() on queue resize
2013-09-12 00:51:41 +02:00
Andrew Tridgell 04f8e338b6 hmc5883: add perf count, and removed unnecessary checks for -32768
we've already checked that the absolute value is <= 2048
2013-09-12 00:51:13 +02:00
Lorenz Meier 98ac914cb0 Add setting queue depth to HMC test 2013-09-08 22:07:33 +02:00