From 05007944f10f9520d1398ead760880daa0bc872a Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 21 Apr 2021 06:40:59 -0700 Subject: [PATCH] drivers:barometer Use inttypes --- src/drivers/barometer/bmp280/bmp280.h | 1 - src/drivers/barometer/bmp280/bmp280_main.cpp | 6 +++--- src/drivers/barometer/bmp388/bmp388_main.cpp | 6 +++--- src/drivers/barometer/dps310/DPS310.hpp | 2 +- src/drivers/barometer/dps310/dps310_main.cpp | 6 +++--- src/drivers/barometer/lps22hb/lps22hb_main.cpp | 6 +++--- src/drivers/barometer/lps25h/lps25h.h | 2 +- src/drivers/barometer/lps25h/lps25h_main.cpp | 6 +++--- src/drivers/barometer/lps33hw/lps33hw.hpp | 2 +- src/drivers/barometer/lps33hw/lps33hw_main.cpp | 6 +++--- 10 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/drivers/barometer/bmp280/bmp280.h b/src/drivers/barometer/bmp280/bmp280.h index 9103c97973..b68506e048 100644 --- a/src/drivers/barometer/bmp280/bmp280.h +++ b/src/drivers/barometer/bmp280/bmp280.h @@ -39,7 +39,6 @@ #pragma once #include -#include #define BMP280_ADDR_CAL 0x88 /* address of 12x 2 bytes calibration data */ #define BMP280_ADDR_DATA 0xF7 /* address of 2x 3 bytes p-t data */ diff --git a/src/drivers/barometer/bmp280/bmp280_main.cpp b/src/drivers/barometer/bmp280/bmp280_main.cpp index a77da14357..1ad42885ac 100644 --- a/src/drivers/barometer/bmp280/bmp280_main.cpp +++ b/src/drivers/barometer/bmp280/bmp280_main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2016-2019 PX4 Development Team. All rights reserved. + * Copyright (c) 2016-2019, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -63,13 +63,13 @@ I2CSPIDriverBase *BMP280::instantiate(const BusCLIArguments &cli, const BusInsta } if (interface == nullptr) { - PX4_ERR("failed creating interface for bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_ERR("failed creating interface for bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } if (interface->init() != OK) { delete interface; - PX4_DEBUG("no device on bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_DEBUG("no device on bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } diff --git a/src/drivers/barometer/bmp388/bmp388_main.cpp b/src/drivers/barometer/bmp388/bmp388_main.cpp index 45d4097d5e..e1baad8e5b 100644 --- a/src/drivers/barometer/bmp388/bmp388_main.cpp +++ b/src/drivers/barometer/bmp388/bmp388_main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2019 PX4 Development Team. All rights reserved. + * Copyright (c) 2019, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -61,13 +61,13 @@ I2CSPIDriverBase *BMP388::instantiate(const BusCLIArguments &cli, const BusInsta } if (interface == nullptr) { - PX4_ERR("failed creating interface for bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_ERR("failed creating interface for bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } if (interface->init() != OK) { delete interface; - PX4_DEBUG("no device on bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_DEBUG("no device on bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } diff --git a/src/drivers/barometer/dps310/DPS310.hpp b/src/drivers/barometer/dps310/DPS310.hpp index 74395d68e7..9308ee6ce9 100644 --- a/src/drivers/barometer/dps310/DPS310.hpp +++ b/src/drivers/barometer/dps310/DPS310.hpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2019 PX4 Development Team. All rights reserved. + * Copyright (c) 2019, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/drivers/barometer/dps310/dps310_main.cpp b/src/drivers/barometer/dps310/dps310_main.cpp index 02a30a3030..62ad03084a 100644 --- a/src/drivers/barometer/dps310/dps310_main.cpp +++ b/src/drivers/barometer/dps310/dps310_main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2019 PX4 Development Team. All rights reserved. + * Copyright (c) 2019, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -68,13 +68,13 @@ I2CSPIDriverBase *DPS310::instantiate(const BusCLIArguments &cli, const BusInsta } if (interface == nullptr) { - PX4_ERR("failed creating interface for bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_ERR("failed creating interface for bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } if (interface->init() != OK) { delete interface; - PX4_DEBUG("no device on bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_DEBUG("no device on bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } diff --git a/src/drivers/barometer/lps22hb/lps22hb_main.cpp b/src/drivers/barometer/lps22hb/lps22hb_main.cpp index 1c4bf5bb4e..f5fbffd8cf 100644 --- a/src/drivers/barometer/lps22hb/lps22hb_main.cpp +++ b/src/drivers/barometer/lps22hb/lps22hb_main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2018 PX4 Development Team. All rights reserved. + * Copyright (c) 2018, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -56,13 +56,13 @@ I2CSPIDriverBase *LPS22HB::instantiate(const BusCLIArguments &cli, const BusInst } if (interface == nullptr) { - PX4_ERR("failed creating interface for bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_ERR("failed creating interface for bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } if (interface->init() != OK) { delete interface; - PX4_DEBUG("no device on bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_DEBUG("no device on bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } diff --git a/src/drivers/barometer/lps25h/lps25h.h b/src/drivers/barometer/lps25h/lps25h.h index a16a1c2557..8b05c1d58d 100644 --- a/src/drivers/barometer/lps25h/lps25h.h +++ b/src/drivers/barometer/lps25h/lps25h.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2016 PX4 Development Team. All rights reserved. + * Copyright (c) 2016, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/drivers/barometer/lps25h/lps25h_main.cpp b/src/drivers/barometer/lps25h/lps25h_main.cpp index 0b2f7c6ff3..9d31e528a4 100644 --- a/src/drivers/barometer/lps25h/lps25h_main.cpp +++ b/src/drivers/barometer/lps25h/lps25h_main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2016-2020 PX4 Development Team. All rights reserved. + * Copyright (c) 2016-2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -60,13 +60,13 @@ I2CSPIDriverBase *LPS25H::instantiate(const BusCLIArguments &cli, const BusInsta } if (interface == nullptr) { - PX4_ERR("failed creating interface for bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_ERR("failed creating interface for bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } if (interface->init() != OK) { delete interface; - PX4_DEBUG("no device on bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_DEBUG("no device on bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } diff --git a/src/drivers/barometer/lps33hw/lps33hw.hpp b/src/drivers/barometer/lps33hw/lps33hw.hpp index 5539e666bc..2dd9663550 100644 --- a/src/drivers/barometer/lps33hw/lps33hw.hpp +++ b/src/drivers/barometer/lps33hw/lps33hw.hpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2020 PX4 Development Team. All rights reserved. + * Copyright (c) 2020, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/drivers/barometer/lps33hw/lps33hw_main.cpp b/src/drivers/barometer/lps33hw/lps33hw_main.cpp index 168b0562f3..88e1279902 100644 --- a/src/drivers/barometer/lps33hw/lps33hw_main.cpp +++ b/src/drivers/barometer/lps33hw/lps33hw_main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2020 PX4 Development Team. All rights reserved. + * Copyright (c) 2020, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -69,13 +69,13 @@ I2CSPIDriverBase *LPS33HW::instantiate(const BusCLIArguments &cli, const BusInst } if (interface == nullptr) { - PX4_ERR("failed creating interface for bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_ERR("failed creating interface for bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; } if (interface->init() != OK) { delete interface; - PX4_DEBUG("no device on bus %i (devid 0x%x)", iterator.bus(), iterator.devid()); + PX4_DEBUG("no device on bus %i (devid 0x%" PRIx32 ")", iterator.bus(), iterator.devid()); return nullptr; }