this doesn't gain us anything; it's a private function which is only called in one place and replicates checks that the caller already makes (it devolves into a one-liner, essentially!)
This method is also confusing as it sits next to "get_temperature" in the code, which is actually a match for get_differential_pressure, not get_pressure
... but the chief advantage IMO is not updating the healthy state in this method.
../../libraries/AP_Airspeed/AP_Airspeed_AUAV.h:68:11: warning: private field 'pressure_abs_L' is not used [-Wunused-private-field]
68 | float pressure_abs_L;
CubeNode was trying to check a parameter which doesn't exist
../../libraries/AP_Airspeed/Airspeed_Calibration.cpp: In member function 'void AP_Airspeed::send_airspeed_calibration(const Vector3f&)':
../../libraries/AP_Airspeed/Airspeed_Calibration.cpp:179:23: error: 'class AP_Airspeed_Params' has no member named 'autocal'
179 | if (!param[i].autocal && !calibration_enabled) {
| ^~~~~~~
compilation terminated due to -Wfatal-errors.
* remove unnecessary nullptr check, these are always called from an
initialized AP_DroneCAN so if it's nullptr something has gone
horrifically wrong
* pass in driver index instead of repeatedly calling function to get it
* simplify error handling; knowing exactly which allocation failed is not
super helpful and one failing likely means subsequent ones will too,
as it can only fail due to being out of memory
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
* The previous method negated earth-frame vertical velocity
* In a steep dive on a plane, the 2D ground speed assumption of speed breaks down
* Use 3D speed always
* If only a 2D fix is avialable, then vertical velocity should be 0
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
AP_Periph does not have the ARSPD_BUS parameter, and setting this
default sets the bus to one that doesn't exist, plus it can't be fixed
using user parameters