mirror of
https://github.com/merbanan/rtl_433.git
synced 2026-07-30 10:08:18 -04:00
Fix automatic discriminator selection for file input (#3554)
This commit is contained in:
committed by
GitHub
parent
335d47e977
commit
263ac3e867
@@ -73,10 +73,10 @@ typedef struct r_cfg {
|
||||
volatile sig_atomic_t hop_now; ///< flag to cause channel hopping, async written by signal handler and push_sdr_flow()
|
||||
volatile sig_atomic_t exit_async; ///< flag to cause exiting, async written by signal handler
|
||||
volatile sig_atomic_t exit_code; ///< 0=no err, 1=params or cmd line err, 2=sdr device read error, 3=usb init error, 5=USB error (reset), other=other error
|
||||
int frequencies;
|
||||
int frequency_index;
|
||||
uint32_t frequency[MAX_FREQS];
|
||||
uint32_t center_frequency;
|
||||
int frequencies; ///< The number of entries in the frequency hopping list.
|
||||
int frequency_index; ///< The current position in the frequency hopping list.
|
||||
uint32_t frequency[MAX_FREQS]; ///< A list of hopping frequencies.
|
||||
uint32_t center_frequency; ///< The current center frequency of the live or file input.
|
||||
int fsk_pulse_detect_mode;
|
||||
int hop_times;
|
||||
int hop_time[MAX_FREQS];
|
||||
|
||||
@@ -1093,8 +1093,7 @@ static void process_sdr_frame(r_cfg_t *cfg, unsigned char *iq_buf, uint32_t len)
|
||||
// Select needed discriminator based on current frequency or manual setting
|
||||
unsigned fpdm = cfg->fsk_pulse_detect_mode;
|
||||
if (cfg->fsk_pulse_detect_mode == FSK_PULSE_DETECT_AUTO) {
|
||||
// FIXME: this is wrong to be compatible with tests and won't work for file inputs
|
||||
if (cfg->frequency[cfg->frequency_index] > FSK_PULSE_DETECTOR_LIMIT) {
|
||||
if (cfg->center_frequency > FSK_PULSE_DETECTOR_LIMIT) {
|
||||
fpdm = FSK_PULSE_DETECT_NEW;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user