From 44e5c82cdc5412d59bcef5e7f5b127c805ba6d3d Mon Sep 17 00:00:00 2001 From: wu58430 Date: Tue, 19 Dec 2023 11:10:48 +0800 Subject: [PATCH] update --- .idea/workspace.xml | 45 +++++++++++++++++++++++++++------------------ app/spectrum.h | 9 +++++---- driver/bk4819.c | 14 ++++++++++---- frequencies.c | 7 +++++-- frequencies.h | 5 +++++ payment/sponsors.md | 2 ++ settings.c | 2 +- ui/helper.c | 4 ++-- 8 files changed, 57 insertions(+), 31 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index dc10d31..4518cce 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -20,7 +20,12 @@ - + + + + + + @@ -587,7 +596,6 @@ - @@ -612,6 +620,7 @@ - \ No newline at end of file diff --git a/app/spectrum.h b/app/spectrum.h index a9ccf4b..f9e9d0e 100644 --- a/app/spectrum.h +++ b/app/spectrum.h @@ -46,11 +46,9 @@ static const uint8_t U8RssiMap[] = { }; static const uint16_t scanStepValues[] = { - 1, 10, 50, 100, - - 250, 500, 625, 833, 1000, 1250, 2500, 10000, + 1, 10, 50, 100, 250, 500, 625, 833, + 1000, 1250, 1500, 2000, 2500, 5000, 10000, }; - static const uint16_t scanStepBWRegValues[] = { // RX RXw TX BW // 0b0 000 000 001 01 1000 @@ -111,7 +109,10 @@ typedef enum ScanStep { S_STEP_8_33kHz, S_STEP_10_0kHz, S_STEP_12_5kHz, + S_STEP_15_0kHz, + S_STEP_20_0kHz, S_STEP_25_0kHz, + S_STEP_50_0kHz, S_STEP_100_0kHz, } ScanStep; diff --git a/driver/bk4819.c b/driver/bk4819.c index 901c979..f1c2bd0 100644 --- a/driver/bk4819.c +++ b/driver/bk4819.c @@ -488,8 +488,9 @@ void BK4819_SetCTCSSFrequency(uint32_t FreqControlWord) // Enable Auto CDCSS Bw Mode // Enable Auto CTCSS Bw Mode // CTCSS/CDCSS Tx Gain1 Tuning = 74 - // - Config = 0x904A; // 1 0 0 1 0 0 0 0 0 1001010 + //亚音 +// Config = 0x904A; // 1 0 0 1 0 0 0 0 0 1001010 + Config = 0x9033; } BK4819_WriteRegister(BK4819_REG_51, Config); @@ -1421,7 +1422,10 @@ void BK4819_GenTail(uint8_t Tail) void BK4819_EnableCDCSS(void) { BK4819_GenTail(0); // CTC134 - BK4819_WriteRegister(BK4819_REG_51, 0x804A); + //亚音 +// BK4819_WriteRegister(BK4819_REG_51, 0x804A); + BK4819_WriteRegister(BK4819_REG_51, 0x8033); + } void BK4819_EnableCTCSS(void) @@ -1470,8 +1474,10 @@ void BK4819_EnableCTCSS(void) // <6:0> 0 CTCSS/CDCSS Tx Gain1 Tuning // 0 = min // 127 = max +//亚音 +// BK4819_WriteRegister(BK4819_REG_51, 0x904A); // 1 0 0 1 0 0 0 0 0 1001010 + BK4819_WriteRegister(BK4819_REG_51, 0x9033); // 1 0 0 1 0 0 0 0 0 1001010 - BK4819_WriteRegister(BK4819_REG_51, 0x904A); // 1 0 0 1 0 0 0 0 0 1001010 } uint16_t BK4819_GetRSSI(void) diff --git a/frequencies.c b/frequencies.c index 76ef446..56855cb 100644 --- a/frequencies.c +++ b/frequencies.c @@ -80,19 +80,22 @@ const uint16_t gStepFrequencyTable[] = { [STEP_0_5kHz] = 50, [STEP_1kHz] = 100, [STEP_1_25kHz] = 125, + [STEP_9kHz] = 900, [STEP_15kHz] = 1500, + [STEP_20kHz] = 2000, [STEP_30kHz] = 3000, [STEP_50kHz] = 5000, [STEP_100kHz] = 10000, [STEP_125kHz] = 12500, + [STEP_200kHz] = 20000, [STEP_250kHz] = 25000, [STEP_500kHz] = 50000 }; const STEP_Setting_t StepSortedIndexes[] = { STEP_0_01kHz, STEP_0_05kHz, STEP_0_1kHz, STEP_0_25kHz, STEP_0_5kHz, STEP_1kHz, STEP_1_25kHz, STEP_2_5kHz, STEP_5kHz, STEP_6_25kHz, - STEP_8_33kHz, STEP_10kHz, STEP_12_5kHz, STEP_15kHz, STEP_25kHz, STEP_30kHz, STEP_50kHz, STEP_100kHz, - STEP_125kHz, STEP_250kHz, STEP_500kHz + STEP_8_33kHz, STEP_9kHz, STEP_10kHz, STEP_12_5kHz, STEP_15kHz, STEP_20kHz, STEP_25kHz, STEP_30kHz, STEP_50kHz, STEP_100kHz, + STEP_125kHz, STEP_200kHz, STEP_250kHz, STEP_500kHz }; STEP_Setting_t FREQUENCY_GetStepIdxFromSortedIdx(uint8_t sortedIdx) diff --git a/frequencies.h b/frequencies.h index f050a6d..f68f5a5 100644 --- a/frequencies.h +++ b/frequencies.h @@ -43,6 +43,7 @@ typedef enum { extern const freq_band_table_t frequencyBandTable[]; typedef enum { +// standard steps STEP_2_5kHz, STEP_5kHz, STEP_6_25kHz, @@ -50,6 +51,7 @@ typedef enum { STEP_12_5kHz, STEP_25kHz, STEP_8_33kHz, +// custom steps STEP_0_01kHz, STEP_0_05kHz, STEP_0_1kHz, @@ -57,11 +59,14 @@ typedef enum { STEP_0_5kHz, STEP_1kHz, STEP_1_25kHz, + STEP_9kHz, STEP_15kHz, + STEP_20kHz, STEP_30kHz, STEP_50kHz, STEP_100kHz, STEP_125kHz, + STEP_200kHz, STEP_250kHz, STEP_500kHz, STEP_N_ELEM diff --git a/payment/sponsors.md b/payment/sponsors.md index 9ee2a56..454dfc6 100644 --- a/payment/sponsors.md +++ b/payment/sponsors.md @@ -41,6 +41,8 @@ | 豫BG6OIJ | 支付宝打赏 | ¥9.90 | 2023-12-17 | | *转 | 微信打赏 | ¥6.66 | 2023-12-17 | | *了 | 微信打赏 | ¥5.00 | 2023-12-17 | +| 大磊 | 微信打赏 | ¥0.10 | 2023-12-17 | +| sal | 微信打赏 | **¥100.00** | 2023-12-18 | diff --git a/settings.c b/settings.c index 6d3cceb..75468d6 100644 --- a/settings.c +++ b/settings.c @@ -136,7 +136,7 @@ void SETTINGS_InitEEPROM(void) gEeprom.VOICE_PROMPT = (Data[0] < 3) ? Data[0] : VOICE_PROMPT_ENGLISH; #endif #ifdef ENABLE_RSSI_BAR - if((Data[1] < 200 && Data[1] > 90) && (Data[2] < Data[1]-9 && Data[2] > 50)) { + if((Data[1] < 200 && Data[1] > 90) && (Data[2] < Data[1]-9 && Data[1] < 160 && Data[2] > 50)) { gEeprom.S0_LEVEL = Data[1]; gEeprom.S9_LEVEL = Data[2]; } diff --git a/ui/helper.c b/ui/helper.c index 7738fd2..80ccb85 100644 --- a/ui/helper.c +++ b/ui/helper.c @@ -117,7 +117,7 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_ else if (chn_flag[j] != 255) { flag_move = 1; - sum_pixel += 12; + sum_pixel += 13; } } @@ -169,7 +169,7 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_ } memcpy(pFb + now_pixel + 1, &gFontChinese[0], 11); memcpy(pFb1 + now_pixel + 1, &gFontChinese[11], 11); - now_pixel += 12; + now_pixel += 13; } } }