diff --git a/src/main/cli/settings.c b/src/main/cli/settings.c index 7d81f09f0c5..ce56acb97dd 100644 --- a/src/main/cli/settings.c +++ b/src/main/cli/settings.c @@ -1380,6 +1380,7 @@ const clivalue_t valueTable[] = { { "osd_ah_invert", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_OSD_CONFIG, offsetof(osdConfig_t, ahInvert) }, { "osd_logo_on_arming", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OSD_LOGO_ON_ARMING }, PG_OSD_CONFIG, offsetof(osdConfig_t, logo_on_arming) }, { "osd_logo_on_arming_duration",VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 5, 50 }, PG_OSD_CONFIG, offsetof(osdConfig_t, logo_on_arming_duration) }, + { "osd_arming_logo", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, DISPLAYPORT_SEVERITY_COUNT - 1 }, PG_OSD_CONFIG, offsetof(osdConfig_t, arming_logo) }, #ifdef USE_OSD_QUICK_MENU { "osd_use_quick_menu", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_OSD_CONFIG, offsetof(osdConfig_t, osd_use_quick_menu) }, #endif // USE_OSD_QUICK_MENU diff --git a/src/main/osd/osd.c b/src/main/osd/osd.c index 27593016776..b09907cbd1d 100644 --- a/src/main/osd/osd.c +++ b/src/main/osd/osd.c @@ -464,14 +464,14 @@ void pgResetFn_osdElementConfig(osdElementConfig_t *osdElementConfig) osdElementConfig->item_pos[OSD_UP_DOWN_REFERENCE] = OSD_POS((midCol - 2), (midRow - 1)); } -static void osdDrawLogo(int x, int y) +static void osdDrawLogo(int x, int y, displayPortSeverity_e fontSel) { // display logo and help int fontOffset = 160; for (int row = 0; row < OSD_LOGO_ROWS; row++) { for (int column = 0; column < OSD_LOGO_COLS; column++) { if (fontOffset <= SYM_END_OF_FONT) - displayWriteChar(osdDisplayPort, x + column, y + row, DISPLAYPORT_SEVERITY_NORMAL, fontOffset++); + displayWriteChar(osdDisplayPort, x + column, y + row, fontSel, fontOffset++); } } } @@ -491,7 +491,8 @@ static void osdCompleteInitialization(void) displayBeginTransaction(osdDisplayPort, DISPLAY_TRANSACTION_OPT_RESET_DRAWING); displayClearScreen(osdDisplayPort, DISPLAY_CLEAR_WAIT); - osdDrawLogo(midCol - (OSD_LOGO_COLS) / 2, midRow - 5); + // Display betaflight logo + osdDrawLogo(midCol - (OSD_LOGO_COLS) / 2, midRow - 5, DISPLAYPORT_SEVERITY_NORMAL); char string_buffer[30]; tfp_sprintf(string_buffer, "V%s", FC_VERSION_STRING); @@ -1194,7 +1195,7 @@ static timeDelta_t osdShowArmed(void) if ((osdConfig()->logo_on_arming == OSD_LOGO_ARMING_ON) || ((osdConfig()->logo_on_arming == OSD_LOGO_ARMING_FIRST) && !ARMING_FLAG(WAS_EVER_ARMED))) { uint8_t midRow = osdDisplayPort->rows / 2; uint8_t midCol = osdDisplayPort->cols / 2; - osdDrawLogo(midCol - (OSD_LOGO_COLS) / 2, midRow - 5); + osdDrawLogo(midCol - (OSD_LOGO_COLS) / 2, midRow - 5, osdConfig()->arming_logo); ret = osdConfig()->logo_on_arming_duration * 1e5; } else { ret = (REFRESH_1S / 2); diff --git a/src/main/osd/osd.h b/src/main/osd/osd.h index de4511905ac..96e3e57a151 100644 --- a/src/main/osd/osd.h +++ b/src/main/osd/osd.h @@ -355,6 +355,7 @@ typedef struct osdConfig_s { #ifdef USE_SPEC_PREARM_SCREEN uint8_t osd_show_spec_prearm; #endif // USE_SPEC_PREARM_SCREEN + displayPortSeverity_e arming_logo; // font from which to display logo on arming } osdConfig_t; PG_DECLARE(osdConfig_t, osdConfig);