Commit Graph
124 Commits
Author SHA1 Message Date
Paul Riseborough c00c638b77 Remove IMU calibration parameter checks 2017-02-01 08:40:23 +01:00
Lorenz Meier 7326fea142 Driver compile fixes 2017-01-19 19:24:52 +01:00
Lorenz Meier 479e6937d6 LSM303D: 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 cfaef7f433 drivers/lsm303d: Populate device ID in sensor topics 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 37fb74c8b7 Use shorter perf names for LSM303D 2016-03-28 13:03:10 +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 faa80a51e8 Strip unused header 2015-10-24 20:33:10 +02:00
Lorenz Meier 19e3da7169 LSM303D: Fixed code style 2015-10-19 13:18:47 +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 0693e186d9 LSM303D: Add option for 16g range 2015-08-19 10:28:02 +02:00
Lorenz Meier c66517bcd6 LSM303D driver: Add delta angle support 2015-08-19 10:18:53 +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 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 3ac95fb581 lsm303d: run sampling 200usec faster to avoid aliasing
this runs the sampling of the accelerometer 200usec faster than
requested and then throw away duplicates using the accelerometer
status register data ready bit. This avoids aliasing due to drift in
the stm32 clock compared to the lsm303d clock
2015-05-07 15:16:29 +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 b3c45e7178 LSM303D: Temp support 2015-03-25 22:57:32 -07:00
Andrew Tridgell 374c50cab8 lsm303d: support temperature readings in lsm303d
these are read at the same rate as the mag
2015-03-17 13:44:51 +11:00
Lorenz Meier 3436f08976 LSM303D driver: Rotate before applying offsets. 2015-03-15 17:25:55 +01:00
Lorenz Meier 08aa1ebf17 LSM303D: Update comment why we report as internal always 2015-02-15 19:52:02 +01:00
Lorenz Meier a74c7c8009 LSM303D: Return argument in right format 2015-02-15 10:17:01 +01:00
Johan Jansen c7d0cb6bd7 lsm303d: Fix memory initialization and error_count not set 2015-02-10 17:46:56 +01:00
Lorenz Meier 1c2e39bc75 LSM303D: move to 0 based index 2015-02-09 22:56:23 +01:00
Thomas Gubler 8ac05dc8b0 lsm303d: fix if style 2015-02-03 18:20:43 +01:00
Thomas Gubler dedba4307d lsm303d: 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
Lorenz Meier 114465aba4 Move LSM303D mag to new multi-pub interface 2015-01-29 16:33:52 +01:00
Andrew Tridgell 500ac1443b lsm303d: detect large fixed values and report an error
we have logs where the lsm303d gets large fixed values for long
periods. This will detect that error case and raise error_count so the
higher level sensor integration code can choose another sensor
2015-01-02 16:47:48 +11:00
Andrew Tridgell 8470105f9e lsm303d: fixed build warning 2015-01-01 10:04:09 +11:00
Andrew Tridgell b5f6fedfa8 lsm303d: show all perf counters in "info" 2015-01-01 08:51:54 +11:00
Andrew Tridgell 083d9e3e69 lsm303d: check DRDY after check_registers()
this allows recovery from a state where DRDY is not set
2015-01-01 08:51:52 +11:00
Andrew Tridgell 1de7fab974 lsm303d: removed unsafe printf in interrupt context 2015-01-01 08:51:49 +11:00
Andrew Tridgell e4318345f3 lsm303d: added two more checked registers
these are key for DRDY behaviour
2015-01-01 08:51:47 +11:00
Andrew Tridgell 2ac3a6fcf4 l3m303d: added testerror command
useful for testing error handling
2015-01-01 08:51:44 +11:00
Andrew Tridgell 03c40d5d91 lsm303d: replace old register checking with new check_registers() method
this uses the same method as is now used in the MPU6000 to check that
the sensor retains its correct values

Conflicts:
	src/drivers/lsm303d/lsm303d.cpp
2014-12-30 20:55:57 +01:00
Lorenz Meier 54f296ce9d Sensor drivers: Optimize for size 2014-11-15 13:54:01 +01:00