aboutsummaryrefslogtreecommitdiffstats
path: root/src/cnetz/fsk_fm_demod.h
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-01-29 07:25:12 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-02-18 21:01:13 +0100
commit7e45f556cec493c3c77fcb6400d8ae211faf2220 (patch)
treecb5903509228c36e7dcd52ae0a049b380e81f401 /src/cnetz/fsk_fm_demod.h
parentbd7ccc5fa05587606757adbacb6e1bf12f12fd2c (diff)
Correcting all levels and move all remaining integer samples to sample_t
The leves are based on the standards of each mobile network. They are adjusted to the specified frequency deviation now.
Diffstat (limited to 'src/cnetz/fsk_fm_demod.h')
-rw-r--r--src/cnetz/fsk_fm_demod.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cnetz/fsk_fm_demod.h b/src/cnetz/fsk_fm_demod.h
index bf782e5..c8692c3 100644
--- a/src/cnetz/fsk_fm_demod.h
+++ b/src/cnetz/fsk_fm_demod.h
@@ -24,7 +24,7 @@ typedef struct fsk_fm_demod {
int bit_buffer_len; /* number of samples in ring buffer */
int bit_buffer_half; /* half of ring buffer */
int bit_buffer_pos; /* current position to write next sample */
- int level_threshold; /* threshold for detection of next level change */
+ double level_threshold; /* threshold for detection of next level change */
double bits_per_sample; /* duration of one sample in bits */
double next_bit; /* count time to detect bits */
int bit_count; /* counts bits, to match 4 bits at distributed signaling */
@@ -45,7 +45,7 @@ typedef struct fsk_fm_demod {
int rx_buffer_count; /* counter when receiving bits */
/* statistics */
- int change_levels[256]; /* ring buffer to store levels */
+ double change_levels[256]; /* ring buffer to store levels */
double change_when[256]; /* ring buffer to store time when level has changed */
uint8_t change_pos; /* index for next write */
} fsk_fm_demod_t;