mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-11-10 04:37:37 +01:00
remove unused variables, type fixes
Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
parent
0a90c7d417
commit
50743b1ccb
@ -534,7 +534,7 @@ int rtlsdr_demod_write_reg(rtlsdr_dev_t *dev, uint8_t page, uint16_t addr, uint1
|
|||||||
|
|
||||||
void rtlsdr_set_gpio_bit(rtlsdr_dev_t *dev, uint8_t gpio, int val)
|
void rtlsdr_set_gpio_bit(rtlsdr_dev_t *dev, uint8_t gpio, int val)
|
||||||
{
|
{
|
||||||
uint8_t r;
|
uint16_t r;
|
||||||
|
|
||||||
gpio = 1 << gpio;
|
gpio = 1 << gpio;
|
||||||
r = rtlsdr_read_reg(dev, SYSB, GPO, 1);
|
r = rtlsdr_read_reg(dev, SYSB, GPO, 1);
|
||||||
|
@ -306,8 +306,7 @@ void manchester(uint16_t *buf, int len)
|
|||||||
|
|
||||||
void messages(uint16_t *buf, int len)
|
void messages(uint16_t *buf, int len)
|
||||||
{
|
{
|
||||||
int i, i2, start, preamble_found;
|
int i, data_i, index, shift, frame_len;
|
||||||
int data_i, index, shift, frame_len;
|
|
||||||
// todo, allow wrap across buffers
|
// todo, allow wrap across buffers
|
||||||
for (i=0; i<len; i++) {
|
for (i=0; i<len; i++) {
|
||||||
if (buf[i] > 1) {
|
if (buf[i] > 1) {
|
||||||
@ -365,8 +364,8 @@ int main(int argc, char **argv)
|
|||||||
struct sigaction sigact;
|
struct sigaction sigact;
|
||||||
#endif
|
#endif
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
int n_read, r, opt;
|
int r, opt;
|
||||||
int i, gain = AUTO_GAIN; /* tenths of a dB */
|
int gain = AUTO_GAIN; /* tenths of a dB */
|
||||||
int dev_index = 0;
|
int dev_index = 0;
|
||||||
int dev_given = 0;
|
int dev_given = 0;
|
||||||
int ppm_error = 0;
|
int ppm_error = 0;
|
||||||
|
12
src/rtl_fm.c
12
src/rtl_fm.c
@ -394,7 +394,7 @@ void fifth_order(int16_t *data, int length, int16_t *hist)
|
|||||||
void generic_fir(int16_t *data, int length, int *fir, int16_t *hist)
|
void generic_fir(int16_t *data, int length, int *fir, int16_t *hist)
|
||||||
/* Okay, not at all generic. Assumes length 9, fix that eventually. */
|
/* Okay, not at all generic. Assumes length 9, fix that eventually. */
|
||||||
{
|
{
|
||||||
int d, f, temp, sum;
|
int d, temp, sum;
|
||||||
for (d=0; d<length; d+=2) {
|
for (d=0; d<length; d+=2) {
|
||||||
temp = data[d];
|
temp = data[d];
|
||||||
sum = 0;
|
sum = 0;
|
||||||
@ -730,8 +730,7 @@ void arbitrary_resample(int16_t *buf1, int16_t *buf2, int len1, int len2)
|
|||||||
|
|
||||||
void full_demod(struct demod_state *d)
|
void full_demod(struct demod_state *d)
|
||||||
{
|
{
|
||||||
uint8_t dump[BUFFER_DUMP];
|
int i, ds_p;
|
||||||
int i, ds, ds_p, freq_next, n_read;
|
|
||||||
int sr = 0;
|
int sr = 0;
|
||||||
ds_p = d->downsample_passes;
|
ds_p = d->downsample_passes;
|
||||||
if (ds_p) {
|
if (ds_p) {
|
||||||
@ -856,7 +855,7 @@ static void optimal_settings(int freq, int rate)
|
|||||||
{
|
{
|
||||||
// giant ball of hacks
|
// giant ball of hacks
|
||||||
// seems unable to do a single pass, 2:1
|
// seems unable to do a single pass, 2:1
|
||||||
int r, capture_freq, capture_rate;
|
int capture_freq, capture_rate;
|
||||||
struct dongle_state *d = &dongle;
|
struct dongle_state *d = &dongle;
|
||||||
struct demod_state *dm = &demod;
|
struct demod_state *dm = &demod;
|
||||||
struct controller_state *cs = &controller;
|
struct controller_state *cs = &controller;
|
||||||
@ -883,7 +882,7 @@ static void *controller_thread_fn(void *arg)
|
|||||||
{
|
{
|
||||||
// thoughts for multiple dongles
|
// thoughts for multiple dongles
|
||||||
// might be no good using a controller thread if retune/rate blocks
|
// might be no good using a controller thread if retune/rate blocks
|
||||||
int i, r;
|
int i;
|
||||||
struct controller_state *s = arg;
|
struct controller_state *s = arg;
|
||||||
|
|
||||||
if (s->wb_mode) {
|
if (s->wb_mode) {
|
||||||
@ -1042,8 +1041,7 @@ int main(int argc, char **argv)
|
|||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
struct sigaction sigact;
|
struct sigaction sigact;
|
||||||
#endif
|
#endif
|
||||||
int n_read, r, opt;
|
int r, opt;
|
||||||
int i;
|
|
||||||
int dev_given = 0;
|
int dev_given = 0;
|
||||||
int custom_ppm = 0;
|
int custom_ppm = 0;
|
||||||
dongle_init(&dongle);
|
dongle_init(&dongle);
|
||||||
|
@ -403,7 +403,6 @@ void rms_power(struct tuning_state *ts)
|
|||||||
uint8_t *buf = ts->buf8;
|
uint8_t *buf = ts->buf8;
|
||||||
int buf_len = ts->buf_len;
|
int buf_len = ts->buf_len;
|
||||||
long p, t;
|
long p, t;
|
||||||
int ln, lp;
|
|
||||||
double dc, err;
|
double dc, err;
|
||||||
|
|
||||||
p = t = 0L;
|
p = t = 0L;
|
||||||
@ -588,7 +587,7 @@ void remove_dc(int16_t *data, int length)
|
|||||||
void generic_fir(int16_t *data, int length, int *fir)
|
void generic_fir(int16_t *data, int length, int *fir)
|
||||||
/* Okay, not at all generic. Assumes length 9, fix that eventually. */
|
/* Okay, not at all generic. Assumes length 9, fix that eventually. */
|
||||||
{
|
{
|
||||||
int d, f, temp, sum;
|
int d, temp, sum;
|
||||||
int hist[9] = {0,};
|
int hist[9] = {0,};
|
||||||
/* cheat on the beginning, let it go unfiltered */
|
/* cheat on the beginning, let it go unfiltered */
|
||||||
for (d=0; d<18; d+=2) {
|
for (d=0; d<18; d+=2) {
|
||||||
@ -760,10 +759,9 @@ int main(int argc, char **argv)
|
|||||||
struct sigaction sigact;
|
struct sigaction sigact;
|
||||||
#endif
|
#endif
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
int i, length, n_read, r, opt, wb_mode = 0;
|
int i, length, r, opt, wb_mode = 0;
|
||||||
int f_set = 0;
|
int f_set = 0;
|
||||||
int gain = AUTO_GAIN; // tenths of a dB
|
int gain = AUTO_GAIN; // tenths of a dB
|
||||||
uint8_t *buffer;
|
|
||||||
int dev_index = 0;
|
int dev_index = 0;
|
||||||
int dev_given = 0;
|
int dev_given = 0;
|
||||||
int ppm_error = 0;
|
int ppm_error = 0;
|
||||||
|
@ -111,7 +111,7 @@ int main(int argc, char **argv)
|
|||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
int n_read;
|
int n_read;
|
||||||
int r, opt;
|
int r, opt;
|
||||||
int i, gain = 0;
|
int gain = 0;
|
||||||
int ppm_error = 0;
|
int ppm_error = 0;
|
||||||
int sync_mode = 0;
|
int sync_mode = 0;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
@ -532,8 +532,6 @@ uint32_t e4k_compute_pll_params(struct e4k_pll_params *oscp, uint32_t fosc, uint
|
|||||||
|
|
||||||
int e4k_tune_params(struct e4k_state *e4k, struct e4k_pll_params *p)
|
int e4k_tune_params(struct e4k_state *e4k, struct e4k_pll_params *p)
|
||||||
{
|
{
|
||||||
uint8_t val;
|
|
||||||
|
|
||||||
/* program R + 3phase/2phase */
|
/* program R + 3phase/2phase */
|
||||||
e4k_reg_write(e4k, E4K_REG_SYNTH7, p->r_idx);
|
e4k_reg_write(e4k, E4K_REG_SYNTH7, p->r_idx);
|
||||||
/* program Z */
|
/* program Z */
|
||||||
|
@ -765,7 +765,7 @@ static int r82xx_set_tv_standard(struct r82xx_priv *priv,
|
|||||||
{
|
{
|
||||||
int rc, i;
|
int rc, i;
|
||||||
uint32_t if_khz, filt_cal_lo;
|
uint32_t if_khz, filt_cal_lo;
|
||||||
uint8_t data[5], val;
|
uint8_t data[5];
|
||||||
uint8_t filt_gain, img_r, filt_q, hp_cor, ext_enable, loop_through;
|
uint8_t filt_gain, img_r, filt_q, hp_cor, ext_enable, loop_through;
|
||||||
uint8_t lt_att, flt_ext_widest, polyfil_cur;
|
uint8_t lt_att, flt_ext_widest, polyfil_cur;
|
||||||
int need_calibration;
|
int need_calibration;
|
||||||
|
Loading…
Reference in New Issue
Block a user