0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-05-01 15:51:25 +03:00

disable monitor mode on scan start

This commit is contained in:
OneOfEleven 2023-10-19 22:04:39 +01:00
parent a6dfca4c91
commit 78b4c93f67
6 changed files with 36 additions and 29 deletions

View File

@ -219,6 +219,10 @@ void ACTION_Scan(bool bRestart)
// start scanning
// disable monitor mode
g_monitor_enabled = false;
RADIO_setup_registers(true);
APP_channel_next(true, SCAN_STATE_DIR_FORWARD);
g_scan_pause_10ms = 0; // go NOW

View File

@ -893,12 +893,17 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t Directio
return;
}
// compute the frequency band for the frequency
new_band = FREQUENCY_GetBand(frequency);
// save the new frequency into the VFO
g_tx_vfo->freq_config_rx.frequency = frequency;
// find the first channel that contains this frequency
// currently takes to long to scan all the channels
//
// this currently takes to long to look through all the channels (200)
// with every frequency step, because we have to read each channel from eeprom
// before checking the channels frequency
//
// TODO: include this once we have the entire eeprom loaded
//
@ -909,7 +914,9 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t Directio
g_request_save_channel = 1;
}
else
{ // don't need to go through all the other stuff .. lets speed things up !
{ // don't need to go through all the other stuff
// lets speed things up by simply setting the VCO/PLL frequency
// and the RF filter path (LNA and PA)
#ifdef ENABLE_SQ_OPEN_WITH_UP_DN_BUTTS
if (!key_held && key_pressed)
@ -922,8 +929,8 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t Directio
}
#endif
BK4819_set_rf_frequency(frequency, true);
BK4819_set_rf_filter_path(frequency);
BK4819_set_rf_frequency(frequency, true); // set the VCO/PLL
BK4819_set_rf_filter_path(frequency); // set the proper LNA/PA filter path
}
return;

Binary file not shown.

Binary file not shown.

View File

@ -261,9 +261,6 @@ typedef struct {
t_channel channel[200]; // unused channels are set to all '0xff'
// 0x0C80
#if 0
t_channel vfo[14]; // 2 VFO's (upper/lower) per band, 7 frequency bands
#else
union { // 2 VFO's (upper/lower) per band, 7 frequency bands
t_channel vfo[14]; //
struct { //
@ -271,14 +268,13 @@ typedef struct {
t_channel b; //
} __attribute__((packed)) vfo_band[7]; //
} __attribute__((packed)); //
#endif
// 0x0D60
struct { // these channel attribute settings could have been in the t_channel structure !
uint8_t band:4; // why do QS have these bits ? .. band can/is computed from the frequency
uint8_t band:4; // why do QS have these bits ? band can/is computed from the frequency
uint8_t unused:2; //
uint8_t scanlist2:1; // set if is in scan list 2
uint8_t scanlist1:1; // set if is in scan list 1
uint8_t scanlist2:1; // set if in scan list 2
uint8_t scanlist1:1; // set if in scan list 1
} __attribute__((packed)) channel_attr[200]; //
uint8_t unused1[8]; // 0xff's
@ -292,7 +288,7 @@ typedef struct {
// 0x0E70
uint8_t call1; //
uint8_t squelch; //
uint8_t squelch_level; //
uint8_t tx_timeout; //
uint8_t noaa_auto_scan; //
uint8_t key_lock; //
@ -306,9 +302,9 @@ typedef struct {
#endif
uint8_t channel_display_mode; //
uint8_t cross_vfo; //
uint8_t battery_save; //
uint8_t battery_save_ratio; //
uint8_t dual_watch; //
uint8_t backlight; //
uint8_t backlight_time; //
uint8_t tail_tone_elimination; //
uint8_t vfo_open; //
@ -387,7 +383,7 @@ typedef struct {
uint8_t unused10; // 0xff's
// 0x0F20
uint8_t unused11[8]; // 0xff's
uint8_t unused11[16]; // 0xff's
// 0x0F30
uint8_t aes_key[16]; // disabled = all 0xff