mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 16:55:29 +03:00
Remove blink handling from displayport_msp
Looks like display.c already handles it, and displayport_msp is always using sw blinking.
This commit is contained in:
parent
15fbe0df3e
commit
dd7404b558
1 changed files with 5 additions and 19 deletions
|
@ -254,8 +254,6 @@ static int writeString(displayPort_t *displayPort, uint8_t col, uint8_t row, con
|
|||
static int drawScreen(displayPort_t *displayPort) // 250Hz
|
||||
{
|
||||
static uint8_t counter = 0;
|
||||
static bool lastBlinkStatus = false;
|
||||
bool blinkStatus = getBlinkOnOff();
|
||||
|
||||
if ((!cmsInMenu && IS_RC_MODE_ACTIVE(BOXOSD)) || (counter++ % DRAW_FREQ_DENOM)) { // 62.5Hz
|
||||
return 0;
|
||||
|
@ -277,19 +275,6 @@ static int drawScreen(displayPort_t *displayPort) // 250Hz
|
|||
sendSubFrameMs = (osdConfig()->msp_displayport_fullframe_interval > 0) ? (millis() + DS2MS(osdConfig()->msp_displayport_fullframe_interval)) : 0;
|
||||
}
|
||||
|
||||
if (lastBlinkStatus != blinkStatus) {
|
||||
if (displayConfig()->force_sw_blink) {
|
||||
// Make sure any blinking characters are updated
|
||||
for (unsigned int pos = 0; pos < sizeof(screen); pos++) {
|
||||
if (bitArrayGet(blinkChar, pos)) {
|
||||
bitArraySet(dirty, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastBlinkStatus = blinkStatus;
|
||||
}
|
||||
|
||||
uint8_t subcmd[COLS + 4];
|
||||
uint8_t updateCount = 0;
|
||||
subcmd[0] = MSP_DP_WRITE_STRING;
|
||||
|
@ -309,9 +294,6 @@ static int drawScreen(displayPort_t *displayPort) // 250Hz
|
|||
do {
|
||||
bitArrayClr(dirty, pos);
|
||||
subcmd[len] = isBfCompatibleVideoSystem(osdConfig()) ? getBfCharacter(screen[pos++], page): screen[pos++];
|
||||
if (bitArrayGet(blinkChar, pos) && displayConfig()->force_sw_blink && blinkStatus) {
|
||||
subcmd[len] = SYM_BLANK;
|
||||
}
|
||||
len++;
|
||||
|
||||
if (bitArrayGet(dirty, pos)) {
|
||||
|
@ -323,7 +305,7 @@ static int drawScreen(displayPort_t *displayPort) // 250Hz
|
|||
attributes |= (page << DISPLAYPORT_MSP_ATTR_FONTPAGE);
|
||||
}
|
||||
|
||||
if (blink && !displayConfig()->force_sw_blink) {
|
||||
if (blink) {
|
||||
attributes |= (1 << DISPLAYPORT_MSP_ATTR_BLINK);
|
||||
}
|
||||
|
||||
|
@ -380,6 +362,10 @@ static bool getFontMetadata(displayFontMetadata_t *metadata, const displayPort_t
|
|||
static textAttributes_t supportedTextAttributes(const displayPort_t *displayPort)
|
||||
{
|
||||
UNUSED(displayPort);
|
||||
|
||||
//textAttributes_t attr = TEXT_ATTRIBUTES_NONE;
|
||||
//TEXT_ATTRIBUTES_ADD_BLINK(attr);
|
||||
//return attr;
|
||||
return TEXT_ATTRIBUTES_NONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue