AP_OSD: fix complation without fence

This commit is contained in:
Iampete1 2022-03-04 16:39:00 +00:00 committed by Andrew Tridgell
parent 3942ee0811
commit 520fc01739
2 changed files with 7 additions and 1 deletions

View File

@ -27,6 +27,7 @@
#include <AP_MSP/msp.h>
#include <AP_Baro/AP_Baro.h>
#include <GCS_MAVLink/GCS_MAVLink.h>
#include <AC_Fence/AC_Fence.h>
#ifndef OSD_ENABLED
#define OSD_ENABLED !HAL_MINIMIZE_FEATURES
@ -275,7 +276,9 @@ private:
void draw_current2(uint8_t x, uint8_t y);
void draw_vtx_power(uint8_t x, uint8_t y);
void draw_hgt_abvterr(uint8_t x, uint8_t y);
#if AC_FENCE
void draw_fence(uint8_t x, uint8_t y);
#endif
void draw_rngf(uint8_t x, uint8_t y);

View File

@ -2124,7 +2124,7 @@ void AP_OSD_Screen::draw_hgt_abvterr(uint8_t x, uint8_t y)
}
#endif
#if AC_FENCE
void AP_OSD_Screen::draw_fence(uint8_t x, uint8_t y)
{
AC_Fence *fenceptr = AP::fence();
@ -2137,6 +2137,7 @@ void AP_OSD_Screen::draw_fence(uint8_t x, uint8_t y)
backend->write(x, y, false, "%c", SYMBOL(SYM_FENCE_DISABLED));
}
}
#endif
void AP_OSD_Screen::draw_rngf(uint8_t x, uint8_t y)
{
@ -2200,7 +2201,9 @@ void AP_OSD_Screen::draw(void)
DRAW_SETTING(heading);
DRAW_SETTING(wind);
DRAW_SETTING(home);
#if AC_FENCE
DRAW_SETTING(fence);
#endif
DRAW_SETTING(roll_angle);
DRAW_SETTING(pitch_angle);
DRAW_SETTING(temp);