Commit Graph
102 Commits
Author SHA1 Message Date
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
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