0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 22:58:04 +03:00

Added bat voltage/percentage statusbar compile option

This commit is contained in:
OneOfEleven
2023-09-19 07:59:06 +01:00
parent 787b5add92
commit 7e7439bcb6
9 changed files with 61 additions and 7 deletions

View File

@ -104,6 +104,22 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
}
}
void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer)
{
size_t i;
const unsigned int char_width = ARRAY_SIZE(gFontSmall[0]);
const unsigned int char_spacing = char_width + 0;
for (i = 0; i < strlen(pString); i++)
{
if (pString[i] >= 32)
{
const unsigned int Index = (unsigned int)pString[i] - 32;
if (Index < ARRAY_SIZE(gFontSmall))
memmove(buffer + (i * char_spacing), &gFontSmall[Index], char_width);
}
}
}
void UI_DisplayFrequency(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero, bool bFlag)
{
const unsigned int char_width = 13;