Skip to content

Commit

Permalink
AP_Airspeed: Don't fail on REG_WHOAMI_RECHECK_ID
Browse files Browse the repository at this point in the history
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
  • Loading branch information
landswellsong committed Sep 13, 2024
1 parent 72a0139 commit c215c88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/AP_Airspeed/AP_Airspeed_ASP5033.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ 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)) {
Expand Down

0 comments on commit c215c88

Please sign in to comment.