Fix compiler warnings and error on all configuration combination
This commit is contained in:
@@ -19,17 +19,15 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libfsk/fsk.h"
|
||||
#include "../libwave/wave.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../liblogging/logging.h"
|
||||
#ifdef HAVE_ALSA
|
||||
#include "../libsound/sound.h"
|
||||
#endif
|
||||
#include "../liboptions/options.h"
|
||||
#include "telegramm.h"
|
||||
|
||||
@@ -42,7 +40,7 @@
|
||||
char start_digit = 's';
|
||||
const char *station_id = "50993";
|
||||
const char *dialing;
|
||||
const char *dsp_audiodev = "hw:0,0";
|
||||
const char *dsp_audiodev = "default";
|
||||
int dsp_samplerate = 48000;
|
||||
const char *write_tx_wave = NULL;
|
||||
int dsp_buffer = 50;
|
||||
@@ -68,12 +66,9 @@ wave_rec_t wave_tx_rec;
|
||||
|
||||
/* dummy functions */
|
||||
int num_kanal = 1; /* only one channel used for debugging */
|
||||
void *get_sender_by_empfangsfrequenz(void);
|
||||
void *get_sender_by_empfangsfrequenz() { return NULL; }
|
||||
void display_measurements_add(void);
|
||||
void display_measurements_add() {}
|
||||
void display_measurements_update(void);
|
||||
void display_measurements_update() {}
|
||||
sender_t *get_sender_by_empfangsfrequenz(double __attribute__((unused)) freq) { return NULL; }
|
||||
dispmeasparam_t *display_measurements_add(dispmeas_t __attribute__((unused)) *disp, char __attribute__((unused)) *name, char __attribute__((unused)) *format, enum display_measurements_type __attribute__((unused)) type, enum display_measurements_bar __attribute__((unused)) bar, double __attribute__((unused)) min, double __attribute__((unused)) max, double __attribute__((unused)) mark) { return NULL; }
|
||||
void display_measurements_update(dispmeasparam_t __attribute__((unused)) *param, double __attribute__((unused)) value, double __attribute__((unused)) value2) { }
|
||||
|
||||
#define OPT_METERING 1000
|
||||
#define OPT_COIN_BOX 1001
|
||||
|
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
@@ -26,13 +27,12 @@
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/cc/misc.h>
|
||||
#include "../liboptions/options.h"
|
||||
#include "../liblogging/logging.h"
|
||||
#include "../libfsk/fsk.h"
|
||||
#include "../libwave/wave.h"
|
||||
#include "../libdisplay/display.h"
|
||||
#include "am791x.h"
|
||||
#include "uart.h"
|
||||
#include "datenklo.h"
|
||||
@@ -50,8 +50,7 @@
|
||||
|
||||
/* dummy functions */
|
||||
int num_kanal = 1; /* only one channel used for debugging */
|
||||
void *get_sender_by_empfangsfrequenz(void);
|
||||
void *get_sender_by_empfangsfrequenz() { return "void"; }
|
||||
sender_t *get_sender_by_empfangsfrequenz(double __attribute__((unused)) freq) { return NULL; }
|
||||
|
||||
static datenklo_t datenklo[MAX_DEVICES];
|
||||
static enum am791x_type am791x_type = AM791X_TYPE_7911;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../libfilter/iir_filter.h"
|
||||
#include "../libdisplay/display.h"
|
||||
#include <time.h>
|
||||
|
||||
typedef struct dcf77_tx {
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include "../liblogging/logging.h"
|
||||
#include "../liboptions/options.h"
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libsound/sound.h"
|
||||
#include "../libaaimage/aaimage.h"
|
||||
#include <osmocom/cc/misc.h>
|
||||
#include "dcf77.h"
|
||||
@@ -661,6 +660,5 @@ error:
|
||||
|
||||
void osmo_cc_set_log_cat(int __attribute__((unused)) cc_log_cat) {}
|
||||
|
||||
void *get_sender_by_empfangsfrequenz(void);
|
||||
void *get_sender_by_empfangsfrequenz(void) { return NULL; }
|
||||
sender_t *get_sender_by_empfangsfrequenz(double __attribute__((unused)) freq) { return NULL; }
|
||||
|
||||
|
@@ -25,11 +25,8 @@
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libwave/wave.h"
|
||||
#include "../liblogging/logging.h"
|
||||
#ifdef HAVE_ALSA
|
||||
#include "../libsound/sound.h"
|
||||
#endif
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../liboptions/options.h"
|
||||
|
||||
/* presets */
|
||||
@@ -62,12 +59,9 @@ wave_rec_t wave_tx_rec;
|
||||
|
||||
/* dummy functions */
|
||||
int num_kanal = 1; /* only one channel used for debugging */
|
||||
void *get_sender_by_empfangsfrequenz(void);
|
||||
void *get_sender_by_empfangsfrequenz() { return NULL; }
|
||||
void display_measurements_add(void);
|
||||
void display_measurements_add() {}
|
||||
void display_measurements_update(void);
|
||||
void display_measurements_update() {}
|
||||
sender_t *get_sender_by_empfangsfrequenz(double __attribute__((unused)) freq) { return NULL; }
|
||||
dispmeasparam_t *display_measurements_add(dispmeas_t __attribute__((unused)) *disp, char __attribute__((unused)) *name, char __attribute__((unused)) *format, enum display_measurements_type __attribute__((unused)) type, enum display_measurements_bar __attribute__((unused)) bar, double __attribute__((unused)) min, double __attribute__((unused)) max, double __attribute__((unused)) mark) { return NULL; }
|
||||
void display_measurements_update(dispmeasparam_t __attribute__((unused)) *param, double __attribute__((unused)) value, double __attribute__((unused)) value2) { }
|
||||
|
||||
static void print_help(const char *arg0)
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
#ifdef HAVE_ALSA
|
||||
#include "../libsound/sound.h"
|
||||
#endif
|
||||
#ifdef HAVE_SDR
|
||||
#include "../libsdr/sdr.h"
|
||||
#endif
|
||||
|
@@ -22,13 +22,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libsound/sound.h"
|
||||
#include "../libwave/wave.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../liblogging/logging.h"
|
||||
#include "../liboptions/options.h"
|
||||
#include "../libaaimage/aaimage.h"
|
||||
@@ -367,11 +367,8 @@ done:
|
||||
|
||||
void osmo_cc_set_log_cat(int __attribute__((unused)) cc_log_cat) {}
|
||||
|
||||
void display_measurements_add(void);
|
||||
void *display_measurements_update(void);
|
||||
void *get_sender_by_empfangsfrequenz(void);
|
||||
void display_measurements_add(void) {}
|
||||
void *display_measurements_update(void) { return NULL; }
|
||||
void *get_sender_by_empfangsfrequenz(void) { return NULL; }
|
||||
sender_t *get_sender_by_empfangsfrequenz(double __attribute__((unused)) freq) { return NULL; }
|
||||
dispmeasparam_t *display_measurements_add(dispmeas_t __attribute__((unused)) *disp, char __attribute__((unused)) *name, char __attribute__((unused)) *format, enum display_measurements_type __attribute__((unused)) type, enum display_measurements_bar __attribute__((unused)) bar, double __attribute__((unused)) min, double __attribute__((unused)) max, double __attribute__((unused)) mark) { return NULL; }
|
||||
void display_measurements_update(dispmeasparam_t __attribute__((unused)) *param, double __attribute__((unused)) value, double __attribute__((unused)) value2) { }
|
||||
|
||||
#endif /* ARDUINO */
|
||||
|
@@ -22,17 +22,15 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libwave/wave.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../liblogging/logging.h"
|
||||
#ifdef HAVE_ALSA
|
||||
#include "../libsound/sound.h"
|
||||
#endif
|
||||
#include "../liboptions/options.h"
|
||||
|
||||
/* presets */
|
||||
@@ -50,12 +48,9 @@ wave_rec_t wave_tx_rec;
|
||||
|
||||
/* dummy functions */
|
||||
int num_kanal = 1; /* only one channel used for debugging */
|
||||
void *get_sender_by_empfangsfrequenz(void);
|
||||
void *get_sender_by_empfangsfrequenz() { return NULL; }
|
||||
void display_measurements_add(void);
|
||||
void display_measurements_add() {}
|
||||
void display_measurements_update(void);
|
||||
void display_measurements_update() {}
|
||||
sender_t *get_sender_by_empfangsfrequenz(double __attribute__((unused)) freq) { return NULL; }
|
||||
dispmeasparam_t *display_measurements_add(dispmeas_t __attribute__((unused)) *disp, char __attribute__((unused)) *name, char __attribute__((unused)) *format, enum display_measurements_type __attribute__((unused)) type, enum display_measurements_bar __attribute__((unused)) bar, double __attribute__((unused)) min, double __attribute__((unused)) max, double __attribute__((unused)) mark) { return NULL; }
|
||||
void display_measurements_update(dispmeasparam_t __attribute__((unused)) *param, double __attribute__((unused)) value, double __attribute__((unused)) value2) { }
|
||||
|
||||
/* mate fill table according to eventphone's research */
|
||||
static double conversion[] = {
|
||||
|
@@ -40,14 +40,13 @@ enum paging_signal;
|
||||
|
||||
#define DEFAULT_LO_OFFSET -1000000.0
|
||||
|
||||
void *sender_head = NULL;
|
||||
sender_t *sender_head = NULL;
|
||||
int use_sdr = 0;
|
||||
int num_kanal = 1; /* only one channel used for debugging */
|
||||
int rt_prio = 0;
|
||||
int fast_math = 0;
|
||||
|
||||
void *get_sender_by_empfangsfrequenz(void);
|
||||
void *get_sender_by_empfangsfrequenz() { return NULL; }
|
||||
sender_t *get_sender_by_empfangsfrequenz(double __attribute__((unused)) freq) { return NULL; }
|
||||
|
||||
static double frequency = 0.0;
|
||||
static int dsp_samplerate = 100000;
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <pthread.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../liblogging/logging.h"
|
||||
#include "../libsound/sound.h"
|
||||
#include "../libclipper/clipper.h"
|
||||
#include "radio.h"
|
||||
|
||||
@@ -417,18 +416,29 @@ void radio_exit(radio_t *radio)
|
||||
|
||||
int radio_start(radio_t __attribute__((unused)) *radio)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
#ifdef HAVE_ALSA
|
||||
int rc;
|
||||
|
||||
/* start rx sound */
|
||||
if (radio->rx_sound)
|
||||
if (radio->rx_sound) {
|
||||
rc = sound_start(radio->rx_sound);
|
||||
if (rc < 0) {
|
||||
LOGP(DRADIO, LOGL_ERROR, "Failed to start receiving from audio device..\n");
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
/* start tx sound, if different device */
|
||||
if (radio->tx_sound && radio->tx_sound != radio->rx_sound)
|
||||
if (radio->tx_sound && radio->tx_sound != radio->rx_sound) {
|
||||
rc = sound_start(radio->tx_sound);
|
||||
if (rc < 0) {
|
||||
LOGP(DRADIO, LOGL_ERROR, "Failed to start transmitting to audio device..\n");
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int radio_tx(radio_t *radio, float *baseband, int signal_num)
|
||||
@@ -439,7 +449,9 @@ int radio_tx(radio_t *radio, float *baseband, int signal_num)
|
||||
sample_t *audio_samples[2];
|
||||
sample_t *signal_samples[3];
|
||||
uint8_t *signal_power;
|
||||
#ifdef HAVE_ALSA
|
||||
jitter_frame_t *jf;
|
||||
#endif
|
||||
|
||||
if (signal_num > radio->buffer_size) {
|
||||
LOGP(DRADIO, LOGL_ERROR, "signal_num > buffer_size, please fix!.\n");
|
||||
@@ -622,7 +634,9 @@ int radio_rx(radio_t *radio, float *baseband, int signal_num)
|
||||
int audio_num;
|
||||
sample_t *samples[3];
|
||||
double p;
|
||||
#ifdef HAVE_ALSA
|
||||
jitter_frame_t *jf;
|
||||
#endif
|
||||
|
||||
if (signal_num > radio->buffer_size) {
|
||||
LOGP(DRADIO, LOGL_ERROR, "signal_num > buffer_size, please fix!.\n");
|
||||
@@ -748,9 +762,17 @@ int radio_rx(radio_t *radio, float *baseband, int signal_num)
|
||||
radio->rx_timestamp[1] += audio_num;
|
||||
}
|
||||
audio_num = sound_get_tosend(radio->rx_sound, radio->signal_buffer_size);
|
||||
if (audio_num < 0) {
|
||||
LOGP(DDSP, LOGL_ERROR, "Failed to get number of samples in buffer (rc = %d)!\n", audio_num);
|
||||
if (audio_num == -EPIPE)
|
||||
LOGP(DRADIO, LOGL_ERROR, "Trying to recover.\n");
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
jitter_load_samples(&radio->rx_dejitter[0], (uint8_t *)samples[0], audio_num, sizeof(*samples), NULL, NULL);
|
||||
if (radio->rx_audio_channels == 2)
|
||||
jitter_load_samples(&radio->rx_dejitter[1], (uint8_t *)samples[1], audio_num, sizeof(*samples), NULL, NULL);
|
||||
printf("channels=%d num=%d\n", radio->rx_audio_channels, audio_num);
|
||||
audio_num = sound_write(radio->rx_sound, samples, NULL, audio_num, NULL, NULL, radio->rx_audio_channels);
|
||||
if (audio_num < 0) {
|
||||
LOGP(DRADIO, LOGL_ERROR, "Failed to write to sound device (rc = %d)!\n", audio_num);
|
||||
|
@@ -1,11 +1,7 @@
|
||||
|
||||
#include "../libwave/wave.h"
|
||||
#include "../libsamplerate/samplerate.h"
|
||||
#include "../libemphasis/emphasis.h"
|
||||
#include "../libjitter/jitter.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../libfm/fm.h"
|
||||
#include "../libam/am.h"
|
||||
#include "../libdisplay/display.h"
|
||||
|
||||
enum modulation {
|
||||
MODULATION_NONE = 0,
|
||||
|
@@ -1,18 +1,20 @@
|
||||
void call_down_audio(void);
|
||||
void call_down_audio() { }
|
||||
void call_down_setup(void);
|
||||
void call_down_setup() { }
|
||||
void call_down_release(void);
|
||||
void call_down_release() { }
|
||||
void call_down_disconnect(void);
|
||||
void call_down_disconnect() { }
|
||||
void call_down_answer(void);
|
||||
void call_down_answer() { }
|
||||
void print_help(void);
|
||||
void print_help() { }
|
||||
void sender_send(void);
|
||||
void sender_send() { }
|
||||
void sender_receive(void);
|
||||
void sender_receive() { }
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../libmobile/call.h"
|
||||
#include "../libmobile/main_mobile.h"
|
||||
|
||||
void call_down_audio(void __attribute__((unused)) *decoder, void __attribute__((unused)) *decoder_priv, int __attribute__((unused)) callref, uint16_t __attribute__((unused)) sequence, uint8_t __attribute__((unused)) marker, uint32_t __attribute__((unused)) timestamp, uint32_t __attribute__((unused)) ssrc, uint8_t __attribute__((unused)) *payload, int __attribute__((unused)) payload_len) { }
|
||||
int call_down_setup(int __attribute__((unused)) callref, const char __attribute__((unused)) *caller_id, enum number_type __attribute__((unused)) caller_type, const char __attribute__((unused)) *dialing) { return 0; }
|
||||
void call_down_release(int __attribute__((unused)) callref, int __attribute__((unused)) cause) { }
|
||||
void call_down_disconnect(int __attribute__((unused)) callref, int __attribute__((unused)) cause) { }
|
||||
void call_down_answer(int __attribute__((unused)) callref, struct timeval __attribute__((unused)) *tv_meter) { }
|
||||
void print_help(const char *) { }
|
||||
void sender_send(sender_t __attribute__((unused)) *sender, sample_t __attribute__((unused)) *samples, uint8_t __attribute__((unused)) *power, int __attribute__((unused)) count) { }
|
||||
void sender_receive(sender_t __attribute__((unused)) *sender, sample_t __attribute__((unused)) *samples, int __attribute__((unused)) count, double __attribute__((unused)) rf_level_db) { }
|
||||
void dump_info(void);
|
||||
void dump_info() {}
|
||||
|
@@ -31,9 +31,9 @@ enum paging_signal;
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libfilter/iir_filter.h"
|
||||
#include "../libfm/fm.h"
|
||||
#include "../libwave/wave.h"
|
||||
#include "../libimage/img.h"
|
||||
#include "../liblogging/logging.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#ifdef HAVE_SDR
|
||||
#include "../libsdr/sdr_config.h"
|
||||
#include "../libsdr/sdr.h"
|
||||
@@ -46,13 +46,12 @@ enum paging_signal;
|
||||
|
||||
#define DEFAULT_LO_OFFSET -3000000.0
|
||||
|
||||
void *sender_head = NULL;
|
||||
sender_t *sender_head = NULL;
|
||||
int use_sdr = 0;
|
||||
int num_kanal = 1; /* only one channel used for debugging */
|
||||
int rt_prio = 0;
|
||||
|
||||
void *get_sender_by_empfangsfrequenz(void);
|
||||
void *get_sender_by_empfangsfrequenz() { return NULL; }
|
||||
sender_t *get_sender_by_empfangsfrequenz(double __attribute__((unused)) freq) { return NULL; }
|
||||
|
||||
static double __attribute__((__unused__)) modulation = 0.7; /* level of modulation for I/Q amplitudes */
|
||||
static double frequency = 0.0, audio_offset;
|
||||
|
Reference in New Issue
Block a user