From 1c5b2975dbf9d610c768646d48e8f539abe888f1 Mon Sep 17 00:00:00 2001 From: OneOfEleven Date: Fri, 22 Sep 2023 07:04:56 +0100 Subject: [PATCH] 6th AM test --- app/app.c | 4 ++-- firmware | Bin 166580 -> 166580 bytes firmware.bin | Bin 51900 -> 51900 bytes firmware.packed.bin | Bin 51918 -> 51918 bytes ui/helper.c | 34 +++++++++++++++++----------------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/app.c b/app/app.c index a18e4a1..559e803 100644 --- a/app/app.c +++ b/app/app.c @@ -1413,8 +1413,8 @@ void APP_CheckKeys(void) register uint16_t new_mixer = mixer; register uint16_t new_pga = pga; - // -84dBm, any higher and the AM demodulator starts to saturate/clip (distort) - const uint16_t desired_rssi = (-84 + 160) * 2; // dBm to ADC sample + // -87dBm, any higher and the AM demodulator starts to saturate/clip (distort) + const uint16_t desired_rssi = (-87 + 160) * 2; // dBm to ADC sample // sample the current RSSI level uint16_t rssi = BK4819_GetRSSI(); // 9-bit value (0 .. 511) diff --git a/firmware b/firmware index 11455ed2d63f7a81783e2ffd8a2e8e418a508d10..f91aae292a7c61d9ec4be57cf946181f6714031d 100644 GIT binary patch delta 72 zcmdlom21mXu7)j)VJ4E3G?;I)>6qPQv{|yLI)g!*<3e>7gEs5MuI>3IjOQkZrC6F- Yq#CF2axwV3x`pdPx!Z$}GA14c0G4VPhX4Qo delta 72 zcmdlom21mXu7)j)VJ4C@G?;I)>6qPQv{|yLI)g!*<3e>7gEs5M3ET5c7|%@*Gf7EI YNi|R7N`WlTH@0Hk;sLjV8( diff --git a/firmware.bin b/firmware.bin index 9f18b6c73e1bfe66c8f32d72e8eeb2d9ed89f284..e7552f8d52de43aacc6b8344700848bc9621cbb5 100644 GIT binary patch delta 68 zcmdlpm3hxp<_%#cl9M!;Z?fr_-DI>`vZ*?QL7U@3bryp*>&33k`6lNkh^1JXS)>}L U@NzNuySjzzLb;oRk7lw007!5bLI3~& delta 68 zcmdlpm3hxp<_%#ck~1`zZ?fr_-DI>`vZ*?QL7U@3bryp*>%|G1^G(i85Hm?hOi49Q Up9sAI)S109CdZ{r~^~ diff --git a/firmware.packed.bin b/firmware.packed.bin index 885dc51ab6197f751736b8d108d9795c550e1db0..e7c3c887f01832d1acbe1bfbdd06cb3ca8cf5a9d 100644 GIT binary patch delta 84 zcmV-a0IUDbl>^R|1F!}l2Q00JSOw?{vkf3w6d7!;fJIg?McNSR3xbbCcbRo-L_;Wi qCkGg_e>BdJ7JR1>A~t9hyq+Fcw~*E^M#O9o^yuERW5sC&0??R3_aX2A delta 84 zcmV-a0IUDbl>^R|1F!}l2Ym3*1O@B~vkf3w6d7i&fJIg?McNSR3xbbCcbRo-L_;Wi qCkFzve>BdJ7A*Qkel~0uyq+Fcw~*E^7MVLt^z7WTW5sC&0!gfJz9KgO diff --git a/ui/helper.c b/ui/helper.c index 714a423..aa2794b 100644 --- a/ui/helper.c +++ b/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) { - const unsigned int Index = pString[i] - ' '; + const unsigned int index = pString[i] - ' '; const unsigned int ofs = (unsigned int)Start + (i * Width); - memmove(gFrameBuffer[Line + 0] + ofs, &gFontBig[Index][0], 8); - memmove(gFrameBuffer[Line + 1] + ofs, &gFontBig[Index][8], 7); + memmove(gFrameBuffer[Line + 0] + ofs, &gFontBig[index][0], 8); + 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) { - const unsigned int Index = (unsigned int)pString[i] - 32; - if (Index < ARRAY_SIZE(gFontSmall)) - memmove(pFb + (i * char_spacing), &gFontSmall[Index], char_width); + const unsigned int index = (unsigned int)pString[i] - 32; + if (index < ARRAY_SIZE(gFontSmall)) + 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) { - const unsigned int Index = (unsigned int)pString[i] - 32; - if (Index < ARRAY_SIZE(gFontSmall)) - memmove(buffer + (i * char_spacing), &gFontSmall[Index], char_width); + const unsigned int index = (unsigned int)pString[i] - 32; + if (index < ARRAY_SIZE(gFontSmall)) + 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 while (i < 3) { - const unsigned int Digit = pDigits[i++]; - if (bDisplayLeadingZero || bCanDisplay || Digit > 0) + const unsigned int c = pDigits[i++]; + if (bDisplayLeadingZero || bCanDisplay || c > 0) { #if 0 - memmove(pFb, gFontSmallDigits[Digit], char_width); + memmove(pFb, gFontSmallDigits[c], char_width); #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); #endif pFb += char_width; @@ -198,11 +198,11 @@ void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bD // kHz while (i < 8) { - const unsigned int Digit = pDigits[i++]; + const unsigned int c = pDigits[i++]; #if 0 - memmove(pFb, gFontSmallDigits[Digit], char_width); + memmove(pFb, gFontSmallDigits[c], char_width); #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); #endif 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]; if (c > 0) - display = true; + display = true; // non '0' if (display && c < 11) { #if 0