Fast below IF added and increase RBW if fast scanning

pull/4/head
erikkaashoek 6 years ago
parent b12bbdafc4
commit c08346af2b

@ -996,6 +996,17 @@ void set_freq(int V, unsigned long freq) // translate the requested frequency
} else { } else {
#ifdef __WIDE_OFFSET__ #ifdef __WIDE_OFFSET__
uint32_t target_f; // Impossible to use offset so set SI4432 to new frequency uint32_t target_f; // Impossible to use offset so set SI4432 to new frequency
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) { if (freq + 80000 >= 480000000) {
target_f = freq + 160000; target_f = freq + 160000;
} else { } else {
@ -1005,6 +1016,7 @@ void set_freq(int V, unsigned long freq) // translate the requested frequency
SI4432_Write_Byte(SI4432_FREQ_OFFSET1, 0); // set offset to most negative SI4432_Write_Byte(SI4432_FREQ_OFFSET1, 0); // set offset to most negative
SI4432_Write_Byte(SI4432_FREQ_OFFSET2, 0x02); SI4432_Write_Byte(SI4432_FREQ_OFFSET2, 0x02);
real_old_freq[V] = target_f; real_old_freq[V] = target_f;
}
#else #else
SI4432_Set_Frequency(freq); // Impossible to use offset so set SI4432 to new frequency 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 SI4432_Write_Byte(SI4432_FREQ_OFFSET1, 0); // set offset to zero
@ -1147,6 +1159,12 @@ void update_rbw(void) // calculate the actual_rbw and the vbwSteps (#
} }
actual_rbw_x10 = setting.rbw_x10; // requested rbw actual_rbw_x10 = setting.rbw_x10; // requested rbw
if (actual_rbw_x10 == 0) { // if auto rbw if (actual_rbw_x10 == 0) { // if auto rbw
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 actual_rbw_x10 = 2*setting.vbw_x10; // rbw is twice the frequency step to ensure no gaps in coverage
} }
if (actual_rbw_x10 < 26) if (actual_rbw_x10 < 26)

@ -1292,7 +1292,7 @@ static const menuitem_t menu_atten[] = {
{ MT_CALLBACK | MT_LOW, 0, "AUTO", menu_atten_cb}, { MT_CALLBACK | MT_LOW, 0, "AUTO", menu_atten_cb},
{ MT_KEYPAD | MT_LOW, KM_ATTENUATION, "MANUAL", "0..30"}, { MT_KEYPAD | MT_LOW, KM_ATTENUATION, "MANUAL", "0..30"},
{ MT_CALLBACK | MT_HIGH,0, "0dB", menu_atten_high_cb}, { 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_CANCEL, 0, "\032 BACK", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
}; };

Loading…
Cancel
Save

Powered by TurnKey Linux.