AP_Airspeed: Refuse to calibrate sensors if a device was not initialized #28471
+2
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This helps catch the case where a GCS commands a calibration, and the command is reported as MAV_RESULT_ACCEPTED, even though the actual state is that at least one sensor backend failed. We are still letting the other sensors be calibrated in this situation as a GCS may not be paying proper attention to what happens with the MAV_RESULT and a user could miss the status text, so it's safer to calibrate everything we can, and then report a failure afterwards.
This was initially found with a dronecan airspeed sensor found, but not connected to the bus. The existing status text was insufficient as it was easily lost amongst other messages (prearm checks and the like). Tested on an autopilot on the desk with a I2C sensor connected, disconnected, and a disconnected dronecan sensor.