1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Exclude MSP_OSD_CONFIG if USE_OSD not defined (#12513)

This commit is contained in:
Hans Christian Olaussen 2023-03-14 12:38:32 +01:00 committed by GitHub
parent 515e55ef0a
commit 9b4e6136d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -935,6 +935,7 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
break;
}
#if defined(USE_OSD)
case MSP_OSD_CONFIG: {
#define OSD_FLAGS_OSD_FEATURE (1 << 0)
//#define OSD_FLAGS_OSD_SLAVE (1 << 1)
@ -945,7 +946,7 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
#define OSD_FLAGS_OSD_MSP_DEVICE (1 << 6)
uint8_t osdFlags = 0;
#if defined(USE_OSD)
osdFlags |= OSD_FLAGS_OSD_FEATURE;
osdDisplayPortDevice_e deviceType;
@ -976,7 +977,7 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
default:
break;
}
#endif
sbufWriteU8(dst, osdFlags);
#ifdef USE_OSD_SD
@ -984,9 +985,8 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
sbufWriteU8(dst, vcdProfile()->video_system);
#else
sbufWriteU8(dst, VIDEO_SYSTEM_HD);
#endif
#endif // USE_OSD_SD
#ifdef USE_OSD
// OSD specific, not applicable to OSD slaves.
// Configuration
@ -1049,9 +1049,9 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
sbufWriteU8(dst, osdConfig()->camera_frame_width);
sbufWriteU8(dst, osdConfig()->camera_frame_height);
#endif // USE_OSD
break;
}
#endif // USE_OSD
case MSP_OSD_CANVAS: {
#ifdef USE_OSD