Daniel Agar
d7aaab07fc
delete unused SENSORIOCGQUEUEDEPTH
2017-12-31 09:47:51 -05:00
Daniel Agar
3ead5c2afd
delete unused MAGIOCSLOWPASS/MAGIOCGLOWPASS
2017-12-31 09:47:51 -05:00
Daniel Agar
79869c848f
drivers fix missing field initializers
2017-09-16 21:29:52 +01:00
Karl Schwabe
47d7465476
Bugfix: corrects orientation of magnetometer raw values
...
The magnetomer raw values were not being rotated in the same direction as
the scaled values. This meant that if the rotation was set to ROTATION_NONE,
the raw values and scaled values were off by 180 degrees.
2017-09-11 10:24:35 -07:00
Lorenz Meier
c89bd5c8fd
HMC5883: Fix range setup
2017-07-10 08:32:19 +02:00
Beat Küng
ce7d8d2270
sensor_mag.msg: add is_external flag & set it in the mag drivers
...
With this we don't have to use the ioctl MAGIOCGEXTERNAL, which does not
work on POSIX (eg. RPi).
2017-06-14 19:53:07 +02:00
Beat Küng
546bd2b4d0
drivers: remove the overflow perf counter
...
This was used together with the read() interface, but we don't use that
so the counters are wrong.
2017-03-20 09:11:34 +01:00
Lorenz Meier
be2c73e9c3
HMC driver: Device ID should come from the main instance, not the interface
2017-01-29 16:24:47 +01:00
Lorenz Meier
6c7a8b594e
HMC: Add missing bus identifier
2017-01-29 16:24:47 +01:00
Lorenz Meier
256222d44d
HMC5883: Remove output on driver level. Reporting should be done by the caller, not inside the driver.
2017-01-04 09:40:50 +01:00
Lorenz Meier
3caff7cdca
HMC5883: Support additional I2C buses
2016-12-21 08:34:22 +01:00
Lorenz Meier
143086ba2c
HMC5883: Harden shutdown logic
2016-12-19 20:34:52 +01:00
Lorenz Meier
077f22ece7
HMC5883: Make driver stoppable to simplify system validation
2016-12-19 20:34:52 +01:00
Lorenz Meier
2b518278df
HMC5883: Silence chatty boot
2016-12-12 16:11:21 +01:00
David Sidrane
a2ad92b2d7
Bugfix: Hard Fault hmc5883 with not params
...
Fault results from if (!strcmp(verb, "start")) {``` with null verb
2016-10-22 11:54:38 +02:00
Beat Küng
241fd629ce
ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR
2016-09-30 13:50:51 +02:00
Lorenz Meier
c1e681df60
HMC: Fill extended mag report completely
2016-09-04 19:11:46 +02:00
Lorenz Meier
7398164fcc
Updated PX4 use / API of low level GPIO and other hardware-centric system facilities
2016-05-28 14:56:17 +02:00
Lorenz Meier
4aec95b239
HMC5883: Be less sensitive to large scaling errors and offsets
2016-05-07 14:37:55 +02:00
Robert Dickenson
2dac97fe68
Add required rotation option to driver startup command and fix a couple of details in warnings/comments
2016-04-22 10:30:19 +02:00
Lorenz Meier
54a75d5ef9
HMC: Use shorter perf names
2016-03-28 13:02:41 +02:00
Julian Oes
e0c41632a6
drivers: some fixes for the calibration refactor
2016-03-24 13:08:30 +01:00
Julian Oes
a8955553de
hmc5883: missing semicolons
2016-03-24 13:08:30 +01:00
Julian Oes
8d096c4053
hmc5883: astyle
2016-03-24 13:08:30 +01:00
Julian Oes
b9cc0b74e2
drivers: re-use calibration topic
...
E.g. instead of defining a gyro_scale struct in drv_gyro.h, use the
gyro_calibration message.
2016-03-24 13:08:30 +01:00
Lorenz Meier
b5f0d3e937
HMC5883: Fixed code style
2015-10-19 13:16:25 +02:00
Mark Charlebois
a589d15c52
Refactored debug() and log() in CDev
...
These functions used vprintf which is not available on all platforms.
They also do not enable line and file debug output.
Changed to macros that preserve the output format. Uses new macro that
can be used to implement per object, runtime selectable logging
Signed-off-by: Mark Charlebois <charlebm@gmail.com >
2015-08-11 12:07:06 -07:00
Lorenz Meier
454becdae5
Merged release_v1.0.0 branch into master
2015-06-25 21:45:17 +02:00
Lorenz Meier
ef6092afd9
HMC5883: Calculate correct scaling to apply using multiplication
2015-06-25 14:44:23 +02:00
Lorenz Meier
cae604ac1f
HMC5883: Increase the number of calibration cycles to ensure a stable result
2015-06-25 14:44:23 +02:00
Mark Charlebois
1ca05aaa64
orb_advert_t changed to void * and checks changed to nullptr
...
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.
Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.
Signed-off-by: Mark Charlebois <charlebm@gmail.com >
2015-05-27 14:42:49 -07:00
Mark Charlebois
a734fc96d1
extensive orb_advert_t fixes
...
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.
The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.
Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.
Signed-off-by: Mark Charlebois <charlebm@gmail.com >
2015-05-27 14:41:33 -07:00
Ban Siesta
362fc205b3
drivers: various whitespace
2015-05-24 10:05:42 +01:00
Ban Siesta
21dfd0243d
drivers: use new ringbuffer namespace everywhere
2015-05-24 10:04:38 +01:00
Mark Charlebois
190814bc97
Merge remote-tracking branch 'upstream/master' into linux
...
Signed-off-by: Mark Charlebois <charlebm@gmail.com >
Conflicts:
src/drivers/rgbled/rgbled.cpp
src/modules/commander/PreflightCheck.cpp
src/modules/commander/airspeed_calibration.cpp
src/modules/commander/calibration_routines.cpp
src/modules/commander/gyro_calibration.cpp
src/modules/commander/mag_calibration.cpp
src/modules/mc_att_control/mc_att_control_main.cpp
2015-04-28 11:48:26 -07:00
Lorenz Meier
3835b7a6ec
HMC5883: Let user know we just did not find one
2015-04-27 09:07:53 +02:00
Mark Charlebois
9758112e31
Use px4_config.h instead of nuttx/config.h
...
Modified code to use OS independent header file for config settings.
Signed-off-by: Mark Charlebois <charlebm@gmail.com >
2015-04-20 10:55:41 -07:00
Andrew Tridgell
219d661888
hmc5883: read the temperature every 10 samples when enabled
2015-04-08 17:45:54 +02:00
Andrew Tridgell
02639411ba
hmc5883: added -T option to enable temperature compensation
...
this also fixes the behaviour of the -C option
2015-04-08 17:45:54 +02:00
Andrew Tridgell
e17936e237
hmc5883: try to cope with genuine 5883 parts
...
if we can't read the temperature registers 10 times then disable the
feature.
2015-04-08 17:45:54 +02:00
Andrew Tridgell
156a7915ae
hmc5883: added support for temperature compensation
...
added "hmc5883 tempon" and "hmc5883 tempoff" to enable/disable
2015-04-08 17:45:53 +02:00
Lorenz Meier
953cef9a9e
HMC5883: Temp dummy value
2015-03-25 22:57:47 -07:00
Lorenz Meier
7e9984b1d2
HMC5883 driver: Rotate before applying offsets.
2015-03-15 17:25:19 +01:00
Andrew Tridgell
618d51dab1
hmc5883: fixed build errors with gcc 2.7.4 and -O3
2015-02-16 06:54:05 +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