Commit Graph

103 Commits

Author SHA1 Message Date
Daniel Agar 827725fbe0 cmake remove -Weffc++ (#7044)
- closes #7040
2017-04-13 13:30:22 -04:00
Beat Küng 0d000173b5 l3gd20 selftest: don't check for 0 offset
If temperature compensation is enabled, the offset will be 0
2017-02-03 13:57:48 +01:00
Lorenz Meier 7326fea142 Driver compile fixes 2017-01-19 19:24:52 +01:00
Lorenz Meier 79caa30bd5 L3GD20: Fix devid 2017-01-19 19:24:52 +01:00
Paul Riseborough e84a189380 drivers: use driver class instance as surrogate sensor ID for gyro and accelerometer 2017-01-19 19:24:52 +01:00
Paul Riseborough 14e2ea78b3 drivers/l3gd20: Populate device ID in sensor topic 2017-01-19 19:24:52 +01:00
Henry Zhang b280e28623 MindPX: Remove hardcode for sensors rotation. 2016-10-29 10:56:32 +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 7398164fcc Updated PX4 use / API of low level GPIO and other hardware-centric system facilities 2016-05-28 14:56:17 +02:00
Daniel Agar 69c1ce1714 WIP logger serialization 2016-05-14 11:27:07 +02:00
Daniel Agar eb29b33620 use gcc attributes to align and pack 2016-05-14 11:27:07 +02:00
James Goppert 967e4dd127 Modified cmake to use STACK_MAX and STACK_MAIN 2016-04-14 13:36:36 -04:00
Felix Hu bd580e09bf supports MindPXv2 borad which is a product from AirMind. 2016-03-30 19:45:39 +02:00
Lorenz Meier 6b7142469a Use shorter perf names for L3GD20H 2016-03-28 13:02:59 +02: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 2993c5dd12 L3GD20: Fixed code style 2015-10-19 13:18:24 +02:00
Lorenz Meier fa5071b3c5 Remove module.mk files to prevent confusion of adopters upgrading 2015-10-06 11:23:20 +02:00
Lorenz Meier 6ef94e0dfb Merged master into cmake-2 2015-09-20 10:33:39 +02:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Lorenz Meier 808d8520b5 L3GD20 driver: Add delta angle support 2015-08-19 10:18:53 +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 50ba1f7365 merged release_v1.0.0 into master 2015-06-30 15:30:45 +02:00
Lorenz Meier 51055a16fc L3GD20: Set max offset for gyro to 25 degrees per second based on comment from mailing list about datasheet ratings. 2015-06-26 07:08:54 +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 21dfd0243d drivers: use new ringbuffer namespace everywhere 2015-05-24 10:04:38 +01:00
Lorenz Meier d906fb8f31 Merged master into linux 2015-05-19 21:00:02 +02:00
Randy Mackay a90caf7b7b l3gd20: faster gyro interrupts 2015-05-19 13:25:42 +09:00
Mark Charlebois 36f5d47ed9 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/modules/commander/gyro_calibration.cpp
	src/modules/mavlink/mavlink_ftp.cpp
2015-05-16 15:04:38 -07:00
Andrew Tridgell db8dd000e3 l3gd20: follow same pattern as lsm303d for duplicate rejection 2015-05-07 15:16:34 +10: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
Lorenz Meier f36f43db6f L3GD20(H): driver: Rotate before applying offsets. 2015-03-15 17:25:35 +01:00
Lorenz Meier 56bc843011 L3GD20: Return argument in correct format 2015-02-15 10:17:01 +01:00
Andrew Tridgell 0801dbda38 l3gd20: checking status only makes sense if we have DRDY
it makes no sense on the external SPI bus
2015-02-11 12:48:59 +01:00
Andrew Tridgell e0ac0c4a4b l3gd20: fixed "l3gd20 test"
don't reset after test, and leave us in correct polling mode
2015-02-11 12:48:52 +01:00
Lorenz Meier 8b6ce797b4 L3GD20: Move to 0 based index 2015-02-09 22:56:22 +01:00
Thomas Gubler a7126cc61d l3gd20: fix if style 2015-02-03 18:20:21 +01:00
Thomas Gubler 90b29efebf l3gd20: check for default sample rate 2015-02-03 18:13:01 +01:00
hauptmech 0b784c20c8 Save and check device id for acc and gyro calibration parameters.
Fix config utility to work with all devices of each type.
Accel, gyro and mag devices correctly set their device_id devtype.
Combo devices (mpu6000 lsm303d) now correctly return their devtype.
config util shows device id for all sensor types.
Add, save during calibration and check during preflight ID parameters for accelerometer and gyro
2015-01-31 15:53:34 +01:00
Lorenz Meier d851a630d8 Move all drivers to multi pub/sub API 2015-01-29 16:33:53 +01:00
Andrew Tridgell 7864958f1c l3gd20: fixed build warning 2015-01-01 10:04:07 +11:00
Andrew Tridgell 5c1da70d0c l3gd20: fixed reporting of error count 2015-01-01 08:51:42 +11:00
Andrew Tridgell 1bb3974c84 l3gd20: check DRDY after check_registers() is called
this allows us to recover from an error that disables data ready
2015-01-01 08:51:40 +11:00
Andrew Tridgell 8db2066151 l3gd20: removed printf in interrupt context
this is not safe
2015-01-01 08:51:37 +11:00
Andrew Tridgell 353ea9beac l3gd20: added testerror command
useful for testing error handling
2015-01-01 08:51:34 +11:00
Andrew Tridgell a8cea3a4da l3gd20: use the I2C disable bit on l3gd20H
this seems to prevent a mpu6000 reset from causing an issue on the
l3gd20H
2014-12-30 20:55:57 +01:00
Andrew Tridgell b455d647b2 l3gd20: added "l3gd20 regdump" command 2014-12-30 20:55:57 +01:00
Andrew Tridgell ca47952281 l3gd20: added register checking
this checks at runtime that key registers have correct values
2014-12-30 20:55:57 +01:00
Lorenz Meier 54f296ce9d Sensor drivers: Optimize for size 2014-11-15 13:54:01 +01:00