Reduce FM crackle

pull/73/head
erikkaashoek 2 years ago
parent ebba550577
commit de88c9de4d

@ -1986,8 +1986,8 @@ typedef struct version_t {
#define MAX_VERSION_TEXT 2 #define MAX_VERSION_TEXT 2
const version_t hw_version_text[MAX_VERSION_TEXT] = const version_t hw_version_text[MAX_VERSION_TEXT] =
{ {
{ 165, 175, "V0.4.5.1", 1}, { 165, 179, "V0.4.5.1", 1},
{ 180, 190, "V0.4.5.1.1", 2} { 180, 195, "V0.4.5.1.1", 2}
}; };
uint16_t hwid = 0; uint16_t hwid = 0;

@ -3602,11 +3602,11 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
config.cor_am = INITIAL_MODULATION_CORRECTION; // Initialize with some spare config.cor_am = INITIAL_MODULATION_CORRECTION; // Initialize with some spare
modulation_steps = MAX_MODULATION_STEPS; // Search modulation steps that fit frequency modulation_steps = MAX_MODULATION_STEPS; // Search modulation steps that fit frequency
//modulation_steps = 8; // <-----------------TEMP!!!!! //modulation_steps = 8; // <-----------------TEMP!!!!!
while ( ((modulation_delay = (8000000/ modulation_steps ) / setting.modulation_frequency + config.cor_am)) < 100 && modulation_steps > 4) { while ( ((modulation_delay = (8000000/ modulation_steps ) / setting.modulation_frequency + config.cor_am)) < 120 && modulation_steps > 4) {
sine_wave_index <<= 1; sine_wave_index <<= 1;
modulation_steps >>= 1; modulation_steps >>= 1;
} }
if (modulation_steps > 8) { if (modulation_steps >= 16) {
for (int i = 0; i < modulation_steps/4+1; i++) { for (int i = 0; i < modulation_steps/4+1; i++) {
fm_modulation[i] = setting.modulation_deviation_div100 * sine_wave[i*sine_wave_index]/100; fm_modulation[i] = setting.modulation_deviation_div100 * sine_wave[i*sine_wave_index]/100;
fm_modulation[modulation_steps/2 - i] = fm_modulation[i]; fm_modulation[modulation_steps/2 - i] = fm_modulation[i];

Loading…
Cancel
Save

Powered by TurnKey Linux.