From b41fbe49f3354b97d5fe288e2dcdba75200445df Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 17 Feb 2016 10:20:57 +0100 Subject: [PATCH] df_bmp280_wrapper: astyle --- .../posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/platforms/posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp b/src/platforms/posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp index 065003623c..8d9930f39b 100644 --- a/src/platforms/posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp +++ b/src/platforms/posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp @@ -118,7 +118,8 @@ int DfBmp280Wrapper::start() // TODO: don't publish garbage here baro_report baro_report = {}; _baro_topic = orb_advertise_multi(ORB_ID(sensor_baro), &baro_report, - &_baro_orb_class_instance, ORB_PRIO_DEFAULT); + &_baro_orb_class_instance, ORB_PRIO_DEFAULT); + if (_baro_topic == nullptr) { PX4_ERR("sensor_baro advert fail"); return -1; @@ -207,6 +208,7 @@ int start(/*enum Rotation rotation*/) } int ret = g_dev->start(); + if (ret != 0) { PX4_ERR("DfBmp280Wrapper start failed"); return ret; @@ -215,8 +217,8 @@ int start(/*enum Rotation rotation*/) // Open the IMU sensor DevHandle h; DevMgr::getHandle(BARO_DEVICE_PATH, h); - if (!h.isValid()) - { + + if (!h.isValid()) { DF_LOG_INFO("Error: unable to obtain a valid handle for the receiver at: %s (%d)", BARO_DEVICE_PATH, h.getError()); return -1;