From 1474ddbb78553eba8a3851a6b1f8458b426080a4 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 23 Jan 2016 13:23:32 +0100 Subject: [PATCH] MS5611: Ensure to set the lockmode at the right location --- src/drivers/ms5611/ms5611_spi.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/drivers/ms5611/ms5611_spi.cpp b/src/drivers/ms5611/ms5611_spi.cpp index 1ca0d9cec4..6d10d91ef8 100644 --- a/src/drivers/ms5611/ms5611_spi.cpp +++ b/src/drivers/ms5611/ms5611_spi.cpp @@ -143,11 +143,6 @@ MS5611_SPI::~MS5611_SPI() int MS5611_SPI::init() { - // Sharing a bus with NuttX drivers -#if defined (CONFIG_ARCH_BOARD_PX4FMU_V4) - //set_lockmode(SPI::LOCK_THREADS); -#endif - int ret; ret = SPI::init(); @@ -157,6 +152,11 @@ MS5611_SPI::init() goto out; } + /* sharing a bus with NuttX drivers */ +#if defined (CONFIG_ARCH_BOARD_PX4FMU_V4) + //set_lockmode(SPI::LOCK_THREADS); +#endif + /* send reset command */ ret = _reset();