AP_RangeFinder: allow compilation with HAL_LOGGING_ENABLED false

This commit is contained in:
Peter Barker 2023-07-14 10:58:07 +10:00 committed by Andrew Tridgell
parent 38115bd5fb
commit 330dd7221f
1 changed files with 2 additions and 0 deletions

View File

@ -786,6 +786,7 @@ bool RangeFinder::get_temp(enum Rotation orientation, float &temp) const
return backend->get_temp(temp); return backend->get_temp(temp);
} }
#if HAL_LOGGING_ENABLED
// Write an RFND (rangefinder) packet // Write an RFND (rangefinder) packet
void RangeFinder::Log_RFND() const void RangeFinder::Log_RFND() const
{ {
@ -816,6 +817,7 @@ void RangeFinder::Log_RFND() const
AP::logger().WriteBlock(&pkt, sizeof(pkt)); AP::logger().WriteBlock(&pkt, sizeof(pkt));
} }
} }
#endif // HAL_LOGGING_ENABLED
bool RangeFinder::prearm_healthy(char *failure_msg, const uint8_t failure_msg_len) const bool RangeFinder::prearm_healthy(char *failure_msg, const uint8_t failure_msg_len) const
{ {