mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-05-01 07:41:26 +03:00
disable monitor mode on scan start
This commit is contained in:
parent
a6dfca4c91
commit
78b4c93f67
@ -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
|
||||
|
@ -668,9 +668,9 @@ void APP_stop_scan(void)
|
||||
|
||||
static void APP_next_freq(void)
|
||||
{
|
||||
frequency_band_t new_band;
|
||||
const frequency_band_t old_band = FREQUENCY_GetBand(g_rx_vfo->freq_config_rx.frequency);
|
||||
const uint32_t frequency = APP_set_frequency_by_step(g_rx_vfo, g_scan_state_dir);
|
||||
frequency_band_t new_band;
|
||||
const frequency_band_t old_band = FREQUENCY_GetBand(g_rx_vfo->freq_config_rx.frequency);
|
||||
const uint32_t frequency = APP_set_frequency_by_step(g_rx_vfo, g_scan_state_dir);
|
||||
|
||||
new_band = FREQUENCY_GetBand(frequency);
|
||||
|
||||
|
21
app/main.c
21
app/main.c
@ -883,9 +883,9 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t Directio
|
||||
if (IS_FREQ_CHANNEL(Channel))
|
||||
{ // step/down in frequency
|
||||
|
||||
frequency_band_t new_band;
|
||||
const frequency_band_t old_band = FREQUENCY_GetBand(g_tx_vfo->freq_config_rx.frequency);
|
||||
const uint32_t frequency = APP_set_frequency_by_step(g_tx_vfo, Direction);
|
||||
frequency_band_t new_band;
|
||||
const frequency_band_t old_band = FREQUENCY_GetBand(g_tx_vfo->freq_config_rx.frequency);
|
||||
const uint32_t frequency = APP_set_frequency_by_step(g_tx_vfo, Direction);
|
||||
|
||||
if (FREQUENCY_rx_freq_check(frequency) < 0)
|
||||
{ // frequency not allowed
|
||||
@ -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;
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
34
settings.h
34
settings.h
@ -261,24 +261,20 @@ 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 { //
|
||||
t_channel a; //
|
||||
t_channel b; //
|
||||
} __attribute__((packed)) vfo_band[7]; //
|
||||
} __attribute__((packed)); //
|
||||
#endif
|
||||
union { // 2 VFO's (upper/lower) per band, 7 frequency bands
|
||||
t_channel vfo[14]; //
|
||||
struct { //
|
||||
t_channel a; //
|
||||
t_channel b; //
|
||||
} __attribute__((packed)) vfo_band[7]; //
|
||||
} __attribute__((packed)); //
|
||||
|
||||
// 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
|
||||
@ -429,7 +425,7 @@ typedef struct {
|
||||
char name[10];
|
||||
uint8_t unused[6]; // 0xff's
|
||||
} __attribute__((packed)) channel_name[200];
|
||||
|
||||
|
||||
// 0x1BD0
|
||||
uint8_t unused13[16 * 3]; // 0xff's .. free to use
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user