AP_TemperatureSensor: correct compilation when TSYS01 compiled out

This commit is contained in:
Peter Barker 2022-12-17 18:58:52 +11:00 committed by Andrew Tridgell
parent 274ebbaa44
commit 59a70c6713
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ void AP_TemperatureSensor::init()
}
// For Sub set the Default: Type to TSYS01 and I2C_ADDR of 0x77
#if APM_BUILD_TYPE(APM_BUILD_ArduSub)
#if APM_BUILD_TYPE(APM_BUILD_ArduSub) && AP_TEMPERATURE_SENSOR_TSYS01_ENABLED
AP_Param::set_default_by_name("TEMP1_TYPE", (float)AP_TemperatureSensor_Params::Type::TSYS01);
AP_Param::set_default_by_name("TEMP1_ADDR", TSYS01_ADDR_CSB0);
#endif