aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/l3gd20
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-07-16 15:26:22 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-07-16 15:26:22 +0200
commitc5e4f33bb33689df5acb26ee4f40c70496f9b1eb (patch)
tree381976022f870a4543281589e7d42b67ad76926d /src/drivers/l3gd20
parentca98070f8b479f5d643d810a077ad09e84d32721 (diff)
parent654aaa0ca852b95e4e2bec5cf9b77ca3242d1d63 (diff)
downloadpx4-firmware-c5e4f33bb33689df5acb26ee4f40c70496f9b1eb.tar.gz
px4-firmware-c5e4f33bb33689df5acb26ee4f40c70496f9b1eb.tar.bz2
px4-firmware-c5e4f33bb33689df5acb26ee4f40c70496f9b1eb.zip
Merge sensor_startup_cleanup
Diffstat (limited to 'src/drivers/l3gd20')
-rw-r--r--src/drivers/l3gd20/l3gd20.cpp9
-rw-r--r--src/drivers/l3gd20/module.mk4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/drivers/l3gd20/l3gd20.cpp b/src/drivers/l3gd20/l3gd20.cpp
index 5e90733ff..cfae8761c 100644
--- a/src/drivers/l3gd20/l3gd20.cpp
+++ b/src/drivers/l3gd20/l3gd20.cpp
@@ -331,12 +331,18 @@ private:
* @return 0 on success, 1 on failure
*/
int self_test();
+
+ /* this class does not allow copying */
+ L3GD20(const L3GD20&);
+ L3GD20 operator=(const L3GD20&);
};
L3GD20::L3GD20(int bus, const char* path, spi_dev_e device, enum Rotation rotation) :
SPI("L3GD20", path, bus, device, SPIDEV_MODE3, 11*1000*1000 /* will be rounded to 10.4 MHz, within margins for L3GD20 */),
+ _call{},
_call_interval(0),
_reports(nullptr),
+ _gyro_scale{},
_gyro_range_scale(0.0f),
_gyro_range_rad_s(0.0f),
_gyro_topic(-1),
@@ -1003,6 +1009,9 @@ void info();
/**
* Start the driver.
+ *
+ * This function call only returns once the driver
+ * started or failed to detect the sensor.
*/
void
start(bool external_bus, enum Rotation rotation)
diff --git a/src/drivers/l3gd20/module.mk b/src/drivers/l3gd20/module.mk
index 23e77e871..5630e7aec 100644
--- a/src/drivers/l3gd20/module.mk
+++ b/src/drivers/l3gd20/module.mk
@@ -4,3 +4,7 @@
MODULE_COMMAND = l3gd20
SRCS = l3gd20.cpp
+
+MODULE_STACKSIZE = 1200
+
+EXTRACXXFLAGS = -Weffc++