From 94f2eb499987881c1429b2a24dd2ab190b7e238e Mon Sep 17 00:00:00 2001 From: Oleksiy Protas Date: Fri, 13 Sep 2024 15:40:41 +0300 Subject: [PATCH] AP_Airspeed: Don't fail on REG_WHOAMI_RECHECK_ID This prevents a false negative ID check for the cases when the AP is rebooted independently of the sensor, with the latter keeping a temporary ID that was set during initialization --- libraries/AP_Airspeed/AP_Airspeed_ASP5033.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Airspeed/AP_Airspeed_ASP5033.cpp b/libraries/AP_Airspeed/AP_Airspeed_ASP5033.cpp index e727d5924c..279919f2e1 100644 --- a/libraries/AP_Airspeed/AP_Airspeed_ASP5033.cpp +++ b/libraries/AP_Airspeed/AP_Airspeed_ASP5033.cpp @@ -78,7 +78,7 @@ bool AP_Airspeed_ASP5033::confirm_sensor_id(void) { uint8_t part_id; if (!dev->read_registers(REG_PART_ID_SET, &part_id, 1) || - part_id != REG_WHOAMI_DEFAULT_ID) { + ( (part_id != REG_WHOAMI_DEFAULT_ID) && (part_id != REG_WHOAMI_RECHECK_ID) ) ) { return false; } if (!dev->write_register(REG_PART_ID_SET, REG_WHOAMI_RECHECK_ID)) {