AP_TemperatureSensor: create and use AP_BATTERY_ENABLED

simply as a way to get HAL_PERIPH_ENABLE_BATTERY out of the main code
This commit is contained in:
Peter Barker 2023-06-20 16:08:15 +10:00 committed by Peter Barker
parent 209cba7f89
commit 5df6b835b0

View File

@ -80,7 +80,7 @@ void AP_TemperatureSensor_Backend::update_external_libraries(const float tempera
break;
#endif
#if !defined(HAL_BUILD_AP_PERIPH) || defined(HAL_PERIPH_ENABLE_BATTERY)
#if AP_BATTERY_ENABLED
case AP_TemperatureSensor_Params::Source::Battery_Index:
AP::battery().set_temperature(temperature, _params.source_id-1);
break;