aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-07-16 08:48:10 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-07-16 08:48:10 +0200
commit5baa3690e02067380f35a551e634b67551ed214f (patch)
tree654adbc6d55b6e2e3a7c74b711a06f543d82501d /src
parentf162a3e8d406e52d42ad84ea80ca6678577b9263 (diff)
downloadpx4-firmware-5baa3690e02067380f35a551e634b67551ed214f.tar.gz
px4-firmware-5baa3690e02067380f35a551e634b67551ed214f.tar.bz2
px4-firmware-5baa3690e02067380f35a551e634b67551ed214f.zip
L3GD20: Ensure init and constructors
Diffstat (limited to 'src')
-rw-r--r--src/drivers/l3gd20/l3gd20.cpp6
-rw-r--r--src/drivers/l3gd20/module.mk2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/l3gd20/l3gd20.cpp b/src/drivers/l3gd20/l3gd20.cpp
index 2273f8aec..f72db82c0 100644
--- a/src/drivers/l3gd20/l3gd20.cpp
+++ b/src/drivers/l3gd20/l3gd20.cpp
@@ -330,12 +330,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),
diff --git a/src/drivers/l3gd20/module.mk b/src/drivers/l3gd20/module.mk
index 83752e08b..5630e7aec 100644
--- a/src/drivers/l3gd20/module.mk
+++ b/src/drivers/l3gd20/module.mk
@@ -6,3 +6,5 @@ MODULE_COMMAND = l3gd20
SRCS = l3gd20.cpp
MODULE_STACKSIZE = 1200
+
+EXTRACXXFLAGS = -Weffc++