From b7b23a521aea3de10afad54e01b60a93ac1d94f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 14 Aug 2020 10:51:25 +0200 Subject: [PATCH] sdp3x: remove reset during init It is not playing nice with other devices on the same bus. In particular with the FreeFly RTK GPS: once the reset is sent, the whole bus is blocked and becomes unusable. Current understanding is that this device contains another chip on the bus (apart from the mag+baro+led). I don't see much use for it either, as we configure everything there is to configure (just the mode). --- .../differential_pressure/sdp3x/SDP3X.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/drivers/differential_pressure/sdp3x/SDP3X.cpp b/src/drivers/differential_pressure/sdp3x/SDP3X.cpp index ceba7d6b32..4d7a89d9de 100644 --- a/src/drivers/differential_pressure/sdp3x/SDP3X.cpp +++ b/src/drivers/differential_pressure/sdp3x/SDP3X.cpp @@ -66,23 +66,6 @@ int SDP3X::write_command(uint16_t command) bool SDP3X::init_sdp3x() { - if (get_device_address() == I2C_ADDRESS_1_SDP3X) { // since we are broadcasting, only do it for the first device address - // reset on broadcast - uint16_t prev_addr = get_device_address(); - set_device_address(SDP3X_RESET_ADDR); - uint8_t reset_cmd = SDP3X_RESET_CMD; - int ret = transfer(&reset_cmd, 1, nullptr, 0); - set_device_address(prev_addr); - - if (ret != PX4_OK) { - perf_count(_comms_errors); - return false; - } - - // wait until sensor is ready - px4_usleep(20000); - } - return configure() == 0; }