diff --git a/sa_core.c b/sa_core.c index 96e2f6d..af00984 100644 --- a/sa_core.c +++ b/sa_core.c @@ -996,15 +996,27 @@ void set_freq(int V, unsigned long freq) // translate the requested frequency } else { #ifdef __WIDE_OFFSET__ uint32_t target_f; // Impossible to use offset so set SI4432 to new frequency - if (freq + 80000 >= 480000000) { - target_f = freq + 160000; - } else { - target_f = freq + 80000; + if (freq < real_old_freq[V]) { // sweeping down + if (freq - 80000 >= 480000000) { + target_f = freq - 160000; + } else { + target_f = freq - 80000; + } + SI4432_Set_Frequency(target_f); + SI4432_Write_Byte(SI4432_FREQ_OFFSET1, 0xff); // set offset to most positive + SI4432_Write_Byte(SI4432_FREQ_OFFSET2, 0x01); + real_old_freq[V] = target_f; + } else { // sweeping up + if (freq + 80000 >= 480000000) { + target_f = freq + 160000; + } else { + target_f = freq + 80000; + } + SI4432_Set_Frequency(target_f); + SI4432_Write_Byte(SI4432_FREQ_OFFSET1, 0); // set offset to most negative + SI4432_Write_Byte(SI4432_FREQ_OFFSET2, 0x02); + real_old_freq[V] = target_f; } - SI4432_Set_Frequency(target_f); - SI4432_Write_Byte(SI4432_FREQ_OFFSET1, 0); // set offset to most negative - SI4432_Write_Byte(SI4432_FREQ_OFFSET2, 0x02); - real_old_freq[V] = target_f; #else SI4432_Set_Frequency(freq); // Impossible to use offset so set SI4432 to new frequency SI4432_Write_Byte(SI4432_FREQ_OFFSET1, 0); // set offset to zero @@ -1147,7 +1159,13 @@ void update_rbw(void) // calculate the actual_rbw and the vbwSteps (# } actual_rbw_x10 = setting.rbw_x10; // requested rbw if (actual_rbw_x10 == 0) { // if auto rbw - actual_rbw_x10 = 2*setting.vbw_x10; // rbw is twice the frequency step to ensure no gaps in coverage + if (setting.step_delay_mode==SD_FAST) { // if in fast scanning + if (fast_speedup > 2) + actual_rbw_x10 = 6*setting.vbw_x10; // rbw is four the frequency step to ensure no gaps in coverage as there are some weird jumps + else + actual_rbw_x10 = 4*setting.vbw_x10; // rbw is four the frequency step to ensure no gaps in coverage as there are some weird jumps + } else + actual_rbw_x10 = 2*setting.vbw_x10; // rbw is twice the frequency step to ensure no gaps in coverage } if (actual_rbw_x10 < 26) actual_rbw_x10 = 26; diff --git a/ui_sa.c b/ui_sa.c index 6e31407..00c17d9 100644 --- a/ui_sa.c +++ b/ui_sa.c @@ -1292,7 +1292,7 @@ static const menuitem_t menu_atten[] = { { MT_CALLBACK | MT_LOW, 0, "AUTO", menu_atten_cb}, { MT_KEYPAD | MT_LOW, KM_ATTENUATION, "MANUAL", "0..30"}, { MT_CALLBACK | MT_HIGH,0, "0dB", menu_atten_high_cb}, - { MT_CALLBACK | MT_HIGH,30, "\00225..30dB", menu_atten_high_cb}, + { MT_CALLBACK | MT_HIGH,30, "\00225..40dB", menu_atten_high_cb}, { MT_CANCEL, 0, "\032 BACK", NULL }, { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel };