From 922d5a74f7e5c447216dec3bba727c786e96a98c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 7 Nov 2016 12:41:49 +1100 Subject: [PATCH] HAL_PX4: print msg when I2C device is closed --- libraries/AP_HAL_PX4/I2CDevice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_HAL_PX4/I2CDevice.cpp b/libraries/AP_HAL_PX4/I2CDevice.cpp index 884f9ae3b6..0fd225641d 100644 --- a/libraries/AP_HAL_PX4/I2CDevice.cpp +++ b/libraries/AP_HAL_PX4/I2CDevice.cpp @@ -91,6 +91,8 @@ I2CDevice::I2CDevice(uint8_t bus, uint8_t address) : I2CDevice::~I2CDevice() { + printf("I2C device bus %u address 0x%02x closed\n", + (unsigned)_busnum, (unsigned)_address); } bool I2CDevice::transfer(const uint8_t *send, uint32_t send_len,