mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
6th AM test
This commit is contained in:
parent
d968e3d164
commit
1c5b2975db
@ -1413,8 +1413,8 @@ void APP_CheckKeys(void)
|
|||||||
register uint16_t new_mixer = mixer;
|
register uint16_t new_mixer = mixer;
|
||||||
register uint16_t new_pga = pga;
|
register uint16_t new_pga = pga;
|
||||||
|
|
||||||
// -84dBm, any higher and the AM demodulator starts to saturate/clip (distort)
|
// -87dBm, any higher and the AM demodulator starts to saturate/clip (distort)
|
||||||
const uint16_t desired_rssi = (-84 + 160) * 2; // dBm to ADC sample
|
const uint16_t desired_rssi = (-87 + 160) * 2; // dBm to ADC sample
|
||||||
|
|
||||||
// sample the current RSSI level
|
// sample the current RSSI level
|
||||||
uint16_t rssi = BK4819_GetRSSI(); // 9-bit value (0 .. 511)
|
uint16_t rssi = BK4819_GetRSSI(); // 9-bit value (0 .. 511)
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
34
ui/helper.c
34
ui/helper.c
@ -74,10 +74,10 @@ void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Lin
|
|||||||
{
|
{
|
||||||
if (pString[i] >= ' ' && pString[i] < 127)
|
if (pString[i] >= ' ' && pString[i] < 127)
|
||||||
{
|
{
|
||||||
const unsigned int Index = pString[i] - ' ';
|
const unsigned int index = pString[i] - ' ';
|
||||||
const unsigned int ofs = (unsigned int)Start + (i * Width);
|
const unsigned int ofs = (unsigned int)Start + (i * Width);
|
||||||
memmove(gFrameBuffer[Line + 0] + ofs, &gFontBig[Index][0], 8);
|
memmove(gFrameBuffer[Line + 0] + ofs, &gFontBig[index][0], 8);
|
||||||
memmove(gFrameBuffer[Line + 1] + ofs, &gFontBig[Index][8], 7);
|
memmove(gFrameBuffer[Line + 1] + ofs, &gFontBig[index][8], 7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,9 +97,9 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
|
|||||||
{
|
{
|
||||||
if (pString[i] >= 32)
|
if (pString[i] >= 32)
|
||||||
{
|
{
|
||||||
const unsigned int Index = (unsigned int)pString[i] - 32;
|
const unsigned int index = (unsigned int)pString[i] - 32;
|
||||||
if (Index < ARRAY_SIZE(gFontSmall))
|
if (index < ARRAY_SIZE(gFontSmall))
|
||||||
memmove(pFb + (i * char_spacing), &gFontSmall[Index], char_width);
|
memmove(pFb + (i * char_spacing), &gFontSmall[index], char_width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,9 +113,9 @@ void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer)
|
|||||||
{
|
{
|
||||||
if (pString[i] >= 32)
|
if (pString[i] >= 32)
|
||||||
{
|
{
|
||||||
const unsigned int Index = (unsigned int)pString[i] - 32;
|
const unsigned int index = (unsigned int)pString[i] - 32;
|
||||||
if (Index < ARRAY_SIZE(gFontSmall))
|
if (index < ARRAY_SIZE(gFontSmall))
|
||||||
memmove(buffer + (i * char_spacing), &gFontSmall[Index], char_width);
|
memmove(buffer + (i * char_spacing), &gFontSmall[index], char_width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,13 +174,13 @@ void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bD
|
|||||||
// MHz
|
// MHz
|
||||||
while (i < 3)
|
while (i < 3)
|
||||||
{
|
{
|
||||||
const unsigned int Digit = pDigits[i++];
|
const unsigned int c = pDigits[i++];
|
||||||
if (bDisplayLeadingZero || bCanDisplay || Digit > 0)
|
if (bDisplayLeadingZero || bCanDisplay || c > 0)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
memmove(pFb, gFontSmallDigits[Digit], char_width);
|
memmove(pFb, gFontSmallDigits[c], char_width);
|
||||||
#else
|
#else
|
||||||
const unsigned int index = (Digit < 10) ? '0' - 32 + Digit : '-' - 32;
|
const unsigned int index = (c < 10) ? '0' - 32 + c : '-' - 32;
|
||||||
memmove(pFb, gFontSmall[index], char_width);
|
memmove(pFb, gFontSmall[index], char_width);
|
||||||
#endif
|
#endif
|
||||||
pFb += char_width;
|
pFb += char_width;
|
||||||
@ -198,11 +198,11 @@ void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bD
|
|||||||
// kHz
|
// kHz
|
||||||
while (i < 8)
|
while (i < 8)
|
||||||
{
|
{
|
||||||
const unsigned int Digit = pDigits[i++];
|
const unsigned int c = pDigits[i++];
|
||||||
#if 0
|
#if 0
|
||||||
memmove(pFb, gFontSmallDigits[Digit], char_width);
|
memmove(pFb, gFontSmallDigits[c], char_width);
|
||||||
#else
|
#else
|
||||||
const unsigned int index = (Digit < 10) ? '0' - 32 + Digit : '-' - 32;
|
const unsigned int index = (c < 10) ? '0' - 32 + c : '-' - 32;
|
||||||
memmove(pFb, gFontSmall[index], char_width);
|
memmove(pFb, gFontSmall[index], char_width);
|
||||||
#endif
|
#endif
|
||||||
pFb += char_width;
|
pFb += char_width;
|
||||||
@ -219,7 +219,7 @@ void UI_DisplaySmallDigits(const uint8_t size, const char *str, const uint8_t x,
|
|||||||
{
|
{
|
||||||
const unsigned int c = (unsigned int)str[i];
|
const unsigned int c = (unsigned int)str[i];
|
||||||
if (c > 0)
|
if (c > 0)
|
||||||
display = true;
|
display = true; // non '0'
|
||||||
if (display && c < 11)
|
if (display && c < 11)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user