AIR band revert

This commit is contained in:
ohmytime
2024-05-05 21:44:56 +08:00
parent c951a39c4c
commit 109c2578bd
7 changed files with 473 additions and 64 deletions
+33 -2
View File
@@ -1,3 +1,5 @@
#include "config.h"
#define ON 1
#define OFF 0
#define REVERSE false
@@ -33,6 +35,10 @@
#define FREQ_MW_STEP_9K 9
#define FREQ_MW_STEP_10K 10
#define FREQ_SW_STEP_5K 5
#ifdef HAS_AIR_BAND
#define FREQ_AIR_STEP_25K 25
#define FREQ_AIR_STEP_8K33 8.33
#endif
#define FREQ_OIRT_STEP_30K 3
#define FREQ_FM_STEP_50K 5
#define FREQ_FM_STEP_100K 10
@@ -48,6 +54,10 @@
#define FREQ_SW_LOW_EDGE_MAX (FREQ_SW_160M_START)
#define FREQ_SW_HIGH_EDGE_MIN (FREQ_SW_11M_END)
#define FREQ_SW_HIGH_EDGE_MAX (FREQ_SW_END)
#ifdef HAS_AIR_BAND
#define FREQ_AIR_LOW_EDGE_MIN 108000
#define FREQ_AIR_HIGH_EDGE_MIN 137000
#endif
#define FREQ_FM_START 65000
#define FREQ_FM_END 108000
#define FREQ_FM_OIRT_START 6500 // use values of 1/10 * kHz
@@ -196,9 +206,13 @@
// EEPROM index defines
#define EE_PRESETS_CNT 99 // When set > 99 change the complete EEPROM adressing!
#define EE_CHECKBYTE_VALUE 7 // 0 ~ 255,add new entry, change for new value
#define EE_CHECKBYTE_VALUE 10 // 0 ~ 255,add new entry, change for new value
#define EE_PRESETS_FREQUENCY 0 // Default value when memory channel should be skipped!
#ifdef HAS_AIR_BAND
#define EE_TOTAL_CNT 2219 // Total occupied eeprom bytes
#else
#define EE_TOTAL_CNT 2214 // Total occupied eeprom bytes
#endif
#define EE_PRESETS_BAND_START 0 // 99 * 1 byte
#define EE_PRESET_BW_START 99 // 99 * 1 byte
@@ -296,6 +310,10 @@
#define EE_BYTE_SCANMEM 2211
#define EE_BYTE_SCANCANCEL 2212
#define EE_BYTE_SCANMUTE 2213
#ifdef HAS_AIR_BAND
#define EE_BYTE_AIRSTEPSIZE 2114
#define EE_UINT16_FREQUENCY_AIR 2215
#endif
// End of EEPROM index defines
static const char* const unitString[] = {"dBμV", "dBf", "dBm"};
@@ -319,15 +337,28 @@ enum SCAN_CANCEL {
// FM band: before BAND_GAP; AM band: after BAND_GAP
enum RADIO_BAND {
BAND_OIRT = 0, BAND_FM, BAND_GAP, BAND_LW, BAND_MW, BAND_SW
BAND_OIRT = 0, BAND_FM, BAND_GAP, BAND_LW, BAND_MW, BAND_SW, BAND_AIR
};
#ifndef HAS_AIR_BAND
// Toggle: LW -> MW -> SW
enum RADIO_AM_BAND_SELECTION {
AM_BAND_ALL = 0, AM_BAND_LW_MW, AM_BAND_LW_SW, AM_BAND_MW_SW,
AM_BAND_LW, AM_BAND_MW, AM_BAND_SW, AM_BAND_NONE,
AM_BAND_CNT
};
#else
// Toggle: LW -> MW -> SW -> AIR
enum RADIO_AM_BAND_SELECTION {
AM_BAND_ALL = 0,
AM_BAND_LW_MW_SW, AM_BAND_LW_MW_AIR, AM_BAND_LW_SW_AIR, AM_BAND_MW_SW_AIR,
AM_BAND_LW_MW, AM_BAND_LW_SW, AM_BAND_LW_AIR,
AM_BAND_MW_SW, AM_BAND_MW_AIR,
AM_BAND_SW_AIR,
AM_BAND_LW, AM_BAND_MW, AM_BAND_SW, AM_BAND_AIR, AM_BAND_NONE,
AM_BAND_CNT
};
#endif /* end of HAS_AIR_BAND */
// Toggle: OIRT -> FM
enum RADIO_FM_BAND_SELECTION {