From 88f3537af0df73f9539d04d7b1f5c9e61c16d9e7 Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Mon, 18 Dec 2023 17:03:00 +0100 Subject: [PATCH] 9kHz, 20kHz, 200kHz frequency steps added #295 --- frequencies.c | 45 ++++++++++++++++++++++++--------------------- frequencies.h | 39 +++++++++++++++++++++------------------ 2 files changed, 45 insertions(+), 39 deletions(-) diff --git a/frequencies.c b/frequencies.c index d58f22ebe..df3a193fe 100644 --- a/frequencies.c +++ b/frequencies.c @@ -65,35 +65,38 @@ const freq_band_table_t frequencyBandTable[] = // this order of steps has to be preserved for backwards compatibility with other/stock firmwares const uint16_t gStepFrequencyTable[] = { // standard steps - [STEP_2_5kHz] = 250, - [STEP_5kHz] = 500, - [STEP_6_25kHz] = 625, - [STEP_10kHz] = 1000, - [STEP_12_5kHz] = 1250, - [STEP_25kHz] = 2500, + [STEP_2_5kHz] = 250, + [STEP_5kHz] = 500, + [STEP_6_25kHz] = 625, + [STEP_10kHz] = 1000, + [STEP_12_5kHz] = 1250, + [STEP_25kHz] = 2500, [STEP_8_33kHz] = 833, // custom steps - [STEP_0_01kHz] = 1, - [STEP_0_05kHz] = 5, - [STEP_0_1kHz] = 10, - [STEP_0_25kHz] = 25, - [STEP_0_5kHz] = 50, - [STEP_1kHz] = 100, - [STEP_1_25kHz] = 125, - [STEP_15kHz] = 1500, - [STEP_30kHz] = 3000, - [STEP_50kHz] = 5000, - [STEP_100kHz] = 10000, - [STEP_125kHz] = 12500, - [STEP_250kHz] = 25000, + [STEP_0_01kHz] = 1, + [STEP_0_05kHz] = 5, + [STEP_0_1kHz] = 10, + [STEP_0_25kHz] = 25, + [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 3b421bfb5..b5d4c16fb 100644 --- a/frequencies.h +++ b/frequencies.h @@ -45,27 +45,30 @@ extern const freq_band_table_t frequencyBandTable[]; typedef enum { // standard steps - STEP_2_5kHz, - STEP_5kHz, - STEP_6_25kHz, - STEP_10kHz, - STEP_12_5kHz, - STEP_25kHz, + STEP_2_5kHz, + STEP_5kHz, + STEP_6_25kHz, + STEP_10kHz, + STEP_12_5kHz, + STEP_25kHz, STEP_8_33kHz, // custom steps - STEP_0_01kHz, - STEP_0_05kHz, - STEP_0_1kHz, - STEP_0_25kHz, - STEP_0_5kHz, - STEP_1kHz, - STEP_1_25kHz, + STEP_0_01kHz, + STEP_0_05kHz, + STEP_0_1kHz, + STEP_0_25kHz, + STEP_0_5kHz, + STEP_1kHz, + STEP_1_25kHz, + STEP_9kHz, STEP_15kHz, - STEP_30kHz, - STEP_50kHz, - STEP_100kHz, - STEP_125kHz, - STEP_250kHz, + STEP_20kHz, + STEP_30kHz, + STEP_50kHz, + STEP_100kHz, + STEP_125kHz, + STEP_200kHz, + STEP_250kHz, STEP_500kHz, STEP_N_ELEM } STEP_Setting_t;