summaryrefslogtreecommitdiffstats
path: root/plugins/radio/radio-rtlsdr.c
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-20 23:00:56 +0100
committerManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-20 23:00:56 +0100
commit0d170147150b90678225b55548215d09d8273e6d (patch)
tree8f29a1fd6cdc1e594b88398af4f0c70f9a3a9010 /plugins/radio/radio-rtlsdr.c
parent61354a55ac2abd9e83e1f869cdb735654d6eb74a (diff)
Fix frequency setting bug in Radio API
Passing floats between functions seems to cause problems... not sure why ; anyway, fix this by using a double variable. Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'plugins/radio/radio-rtlsdr.c')
-rw-r--r--plugins/radio/radio-rtlsdr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/radio/radio-rtlsdr.c b/plugins/radio/radio-rtlsdr.c
index e5a609e3..bba0d89a 100644
--- a/plugins/radio/radio-rtlsdr.c
+++ b/plugins/radio/radio-rtlsdr.c
@@ -82,11 +82,11 @@ PUBLIC void _radio_set_mode (unsigned int num, Mode mode) {
_radio_apply_params(dev_ctx[num]);
}
-PUBLIC void _radio_set_freq (unsigned int num, float freq) {
+PUBLIC void _radio_set_freq (unsigned int num, double freq) {
if (!dev_ctx || !dev_ctx[num])
return;
- dev_ctx[num]->freq = freq;
+ dev_ctx[num]->freq = (float)freq;
_radio_apply_params(dev_ctx[num]);
}