AP_TemperatureSensor: allow compilation with HAL_LOGGING_ENABLED false

This commit is contained in:
Peter Barker 2023-07-14 10:58:08 +10:00 committed by Andrew Tridgell
parent 512c1f030f
commit 3ae9e36bd3
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,7 @@ bool AP_TemperatureSensor_Backend::healthy(void) const
return (_state.last_time_ms > 0) && (AP_HAL::millis() - _state.last_time_ms < 5000); return (_state.last_time_ms > 0) && (AP_HAL::millis() - _state.last_time_ms < 5000);
} }
#if HAL_LOGGING_ENABLED
void AP_TemperatureSensor_Backend::Log_Write_TEMP() const void AP_TemperatureSensor_Backend::Log_Write_TEMP() const
{ {
AP::logger().Write("TEMP", AP::logger().Write("TEMP",
@ -49,6 +50,7 @@ void AP_TemperatureSensor_Backend::Log_Write_TEMP() const
"Q" "B" "f" , // types "Q" "B" "f" , // types
AP_HAL::micros64(), _state.instance, _state.temperature); AP_HAL::micros64(), _state.instance, _state.temperature);
} }
#endif
void AP_TemperatureSensor_Backend::set_temperature(const float temperature) void AP_TemperatureSensor_Backend::set_temperature(const float temperature)
{ {