#define RXACTION_PS 2 // deliver 2*119 samples to PS engine
#define RXACTION_DIV 3 // take 2*119 samples, mix them, deliver to a receiver
-static int rxcase[8];
-static int rxid [8];
+static int rxcase[7/*MAX_DDC*/];
+static int rxid [7/*MAX_DDC*/];
int data_socket=-1;
static struct sockaddr_in iq_addr;
static int iq_addr_length;
-static struct sockaddr_in data_addr[8];
-static int data_addr_length[8];
+static struct sockaddr_in data_addr[7/*MAX_DDC*/];
+static int data_addr_length[7/*MAX_DDC*/];
static GThread *new_protocol_thread_id;
static GThread *new_protocol_timer_thread_id;
static long general_sequence = 0;
static long rx_specific_sequence = 0;
static long tx_specific_sequence = 0;
-static long ddc_sequence[8];
+static long ddc_sequence[7/*MAX_DDC*/];
//static int buffer_size=BUFFER_SIZE;
//static int fft_size=4096;
#endif
static GThread *mic_line_thread_id;
#ifdef __APPLE__
-static sem_t *iq_sem_ready[8];
-static sem_t *iq_sem_buffer[8];
+static sem_t *iq_sem_ready[7/*MAX_DDC*/];
+static sem_t *iq_sem_buffer[7/*MAX_DDC*/];
#else
-static sem_t iq_sem_ready[8];
-static sem_t iq_sem_buffer[8];
+static sem_t iq_sem_ready[7/*MAX_DDC*/];
+static sem_t iq_sem_buffer[7/*MAX_DDC*/];
#endif
-static GThread *iq_thread_id[8];
+static GThread *iq_thread_id[7/*MAX_DDC*/];
#ifdef INCLUDED
static int outputsamples;
//
// The buffers used by new_protocol_thread
//
-static mybuffer *iq_buffer[8];
+static mybuffer *iq_buffer[7/*MAX_DDC*/];
static mybuffer *command_response_buffer;
static mybuffer *high_priority_buffer;
static mybuffer *mic_line_buffer;
static pthread_mutex_t tx_spec_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t hi_prio_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t general_mutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t audio_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t audio_buffer_mutex = PTHREAD_MUTEX_INITIALIZER;
static int local_ptt=0;
//
// Only process samples if transmitting in CW
//
- pthread_mutex_lock(&audio_mutex);
+ pthread_mutex_lock(&audio_buffer_mutex);
// insert the samples
audiobuffer[audioindex++]=left_audio_sample>>8;
audiobuffer[audioindex++]=left_audio_sample;
audioindex=4;
audiosequence++;
}
- pthread_mutex_unlock(&audio_mutex);
+ pthread_mutex_unlock(&audio_buffer_mutex);
}
}
//
if (isTransmitting() && (txmode==modeCWU || txmode==modeCWL)) return;
- pthread_mutex_lock(&audio_mutex);
+ pthread_mutex_lock(&audio_buffer_mutex);
// insert the samples
audiobuffer[audioindex++]=left_audio_sample>>8;
audiobuffer[audioindex++]=left_audio_sample;
audioindex=4;
audiosequence++;
}
- pthread_mutex_unlock(&audio_mutex);
+ pthread_mutex_unlock(&audio_buffer_mutex);
}
void new_protocol_flush_iq_samples() {
GtkWidget *rx_gain_label=gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(rx_gain_label), "<b>RX Gain Calibration:</b>");
gtk_grid_attach(GTK_GRID(grid),rx_gain_label,col,row,1,1);
+
col++;
-
GtkWidget *rx_gain_calibration_b=gtk_spin_button_new_with_range(-50.0,50.0,1.0);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(rx_gain_calibration_b),(double)rx_gain_calibration);
gtk_grid_attach(GTK_GRID(grid),rx_gain_calibration_b,col,row,1,1);
g_signal_connect(rx_gain_calibration_b,"value_changed",G_CALLBACK(rx_gain_calibration_value_changed_cb),NULL);
- col++;
+ }
- GtkWidget *PA_enable_b=gtk_check_button_new_with_label("PA enable");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (PA_enable_b), pa_enabled);
- gtk_grid_attach(GTK_GRID(grid),PA_enable_b,col,row,1,1);
- g_signal_connect(PA_enable_b,"toggled",G_CALLBACK(PA_enable_cb),NULL);
+ col++;
+ GtkWidget *PA_enable_b=gtk_check_button_new_with_label("PA enable");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (PA_enable_b), pa_enabled);
+ gtk_grid_attach(GTK_GRID(grid),PA_enable_b,col,row,1,1);
+ g_signal_connect(PA_enable_b,"toggled",G_CALLBACK(PA_enable_cb),NULL);
- }
row++;
if(row>temp_row) temp_row=row;