1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Prevent osd.c from calling cmsInit and cmsResync if CMS is not defined

This commit is contained in:
jflyper 2016-10-25 18:45:36 +09:00
parent 761e1c5bf2
commit 2e2bac6da3
3 changed files with 11 additions and 3 deletions

View file

@ -397,7 +397,9 @@ void osdInit(void)
}
}
#ifdef CMS
cmsInit();
#endif
sprintf(string_buffer, "BF VERSION: %s", FC_VERSION_STRING);
max7456Write(5, 6, string_buffer);
@ -405,7 +407,9 @@ void osdInit(void)
max7456Write(12, 8, STARTUP_HELP_TEXT2);
max7456Write(12, 9, STARTUP_HELP_TEXT3);
#ifdef CMS
cmsScreenResync(); // Was max7456RefreshAll(); may be okay.
#endif
refreshTimeout = 4 * REFRESH_1S;
}

View file

@ -95,12 +95,13 @@
// Use external OSD to run CMS
//#define CANVAS
#define OLEDCMS
// USE I2C OLED display to run CMS
//#define OLEDCMS
// OSD define info:
// feature name (includes source) -> MAX_OSD, used in target.mk
// include the osd code
//#define OSD
#define OSD
// include the max7456 driver
#define USE_MAX7456

View file

@ -134,4 +134,7 @@
#define CMS
// Use external OSD to run CMS
#define CANVAS
//#define CANVAS
// USE I2C OLED display to run CMS
#define OLEDCMS