AP_OpticalFlow: allow more libraries to compile with no HAL_GCS_ENABLED

This commit is contained in:
Peter Barker 2023-09-02 15:21:35 +10:00 committed by Peter Barker
parent d1bcd2c5e1
commit 59a4269624
1 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,7 @@ bool AP_OpticalFlow_Calibrator::update()
{
// prefix for reporting
const char* prefix_str = "FlowCal:";
(void)prefix_str; // in case !HAL_GCS_ENABLED
// while running add samples
if (_cal_state == CalState::RUNNING) {
@ -190,7 +191,9 @@ bool AP_OpticalFlow_Calibrator::calc_scalars(uint8_t axis, float& scalar, float&
{
// prefix for reporting
const char* prefix_str = "FlowCal:";
(void)prefix_str; // in case !HAL_GCS_ENABLED
const char* axis_str = axis == 0 ? "x" : "y";
(void)axis_str; // in case !HAL_GCS_ENABLED
// check we have samples
// this should never fail because this method should only be called once the sample buffer is full