AP_Airspeed: Add additional DLVR support 20inH2O 30inH2O 60inH2O

This commit is contained in:
Josh Welsh 2020-08-04 14:53:27 -07:00 committed by Andrew Tridgell
parent 8494169aa9
commit 5ed5631c3c
2 changed files with 20 additions and 2 deletions

View File

@ -76,7 +76,7 @@ const AP_Param::GroupInfo AP_Airspeed::var_info[] = {
// @Param: _TYPE // @Param: _TYPE
// @DisplayName: Airspeed type // @DisplayName: Airspeed type
// @Description: Type of airspeed sensor // @Description: Type of airspeed sensor
// @Values: 0:None,1:I2C-MS4525D0,2:Analog,3:I2C-MS5525,4:I2C-MS5525 (0x76),5:I2C-MS5525 (0x77),6:I2C-SDP3X,7:I2C-DLVR-5in,8:UAVCAN,9:I2C-DLVR-10in // @Values: 0:None,1:I2C-MS4525D0,2:Analog,3:I2C-MS5525,4:I2C-MS5525 (0x76),5:I2C-MS5525 (0x77),6:I2C-SDP3X,7:I2C-DLVR-5in,8:UAVCAN,9:I2C-DLVR-10in,10:I2C-DLVR-20in,11:I2C-DLVR-30in,12:I2C-DLVR-60in
// @User: Standard // @User: Standard
AP_GROUPINFO_FLAGS("_TYPE", 0, AP_Airspeed, param[0].type, ARSPD_DEFAULT_TYPE, AP_PARAM_FLAG_ENABLE), AP_GROUPINFO_FLAGS("_TYPE", 0, AP_Airspeed, param[0].type, ARSPD_DEFAULT_TYPE, AP_PARAM_FLAG_ENABLE),
@ -161,7 +161,7 @@ const AP_Param::GroupInfo AP_Airspeed::var_info[] = {
// @Param: 2_TYPE // @Param: 2_TYPE
// @DisplayName: Second Airspeed type // @DisplayName: Second Airspeed type
// @Description: Type of 2nd airspeed sensor // @Description: Type of 2nd airspeed sensor
// @Values: 0:None,1:I2C-MS4525D0,2:Analog,3:I2C-MS5525,4:I2C-MS5525 (0x76),5:I2C-MS5525 (0x77),6:I2C-SDP3X,7:I2C-DLVR-5in,8:UAVCAN,9:I2C-DLVR-10in // @Values: 0:None,1:I2C-MS4525D0,2:Analog,3:I2C-MS5525,4:I2C-MS5525 (0x76),5:I2C-MS5525 (0x77),6:I2C-SDP3X,7:I2C-DLVR-5in,8:UAVCAN,9:I2C-DLVR-10in,10:I2C-DLVR-20in,11:I2C-DLVR-30in,12:I2C-DLVR-60in
// @User: Standard // @User: Standard
AP_GROUPINFO_FLAGS("2_TYPE", 11, AP_Airspeed, param[1].type, 0, AP_PARAM_FLAG_ENABLE), AP_GROUPINFO_FLAGS("2_TYPE", 11, AP_Airspeed, param[1].type, 0, AP_PARAM_FLAG_ENABLE),
@ -297,6 +297,21 @@ void AP_Airspeed::init()
case TYPE_I2C_DLVR_10IN: case TYPE_I2C_DLVR_10IN:
#if !HAL_MINIMIZE_FEATURES #if !HAL_MINIMIZE_FEATURES
sensor[i] = new AP_Airspeed_DLVR(*this, i, 10); sensor[i] = new AP_Airspeed_DLVR(*this, i, 10);
#endif // !HAL_MINIMIZE_FEATURES
break;
case TYPE_I2C_DLVR_20IN:
#if !HAL_MINIMIZE_FEATURES
sensor[i] = new AP_Airspeed_DLVR(*this, i, 20);
#endif // !HAL_MINIMIZE_FEATURES
break;
case TYPE_I2C_DLVR_30IN:
#if !HAL_MINIMIZE_FEATURES
sensor[i] = new AP_Airspeed_DLVR(*this, i, 30);
#endif // !HAL_MINIMIZE_FEATURES
break;
case TYPE_I2C_DLVR_60IN:
#if !HAL_MINIMIZE_FEATURES
sensor[i] = new AP_Airspeed_DLVR(*this, i, 60);
#endif // !HAL_MINIMIZE_FEATURES #endif // !HAL_MINIMIZE_FEATURES
break; break;
case TYPE_UAVCAN: case TYPE_UAVCAN:

View File

@ -153,6 +153,9 @@ public:
TYPE_I2C_DLVR_5IN=7, TYPE_I2C_DLVR_5IN=7,
TYPE_UAVCAN=8, TYPE_UAVCAN=8,
TYPE_I2C_DLVR_10IN=9, TYPE_I2C_DLVR_10IN=9,
TYPE_I2C_DLVR_20IN=10,
TYPE_I2C_DLVR_30IN=11,
TYPE_I2C_DLVR_60IN=12,
}; };
// get current primary sensor // get current primary sensor