Daniel Agar
827725fbe0
cmake remove -Weffc++ ( #7044 )
...
- closes #7040
2017-04-13 13:30:22 -04: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
Beat Küng
78f1d9d017
hmc5883: fix MAGIOCGEXTERNAL ioctl for non fmuv1 boards
...
This makes the onboard check consistent with hmc5883_bus_option
initialization. If the current bus is the onboard bus, return !external.
It fixes the onboard mag (HMC5883) for AeroFC. Its priority is now 100,
previously it was 255, so that if an external mag is attached, it will be
preferred.
2016-12-07 11:06:28 +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
Julian Oes
8ff237c69f
Remove size optimization for individual modules
...
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11: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
James Goppert
967e4dd127
Modified cmake to use STACK_MAX and STACK_MAIN
2016-04-14 13:36:36 -04: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
Lorenz Meier
fa5071b3c5
Remove module.mk files to prevent confusion of adopters upgrading
2015-10-06 11:23:20 +02:00
James Goppert
e55af00222
Removed weak attributes.
2015-09-13 14:40:27 -04:00
James Goppert
1d6b31d196
Switch to cmake build system.
2015-09-07 20:37:45 -04: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
Daniel Agar
c2abb0f82a
fix code style if trivial one line difference
2015-03-19 23:49:36 +01: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
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