BANDSTACK bandstackWWV={5,1,bandstack_entriesWWV};
BAND bands[BANDS] =
- {{"160",&bandstack160,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"80",&bandstack80,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"60",&bandstack60,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"40",&bandstack40,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"30",&bandstack30,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"20",&bandstack20,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"18",&bandstack18,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"15",&bandstack15,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"12",&bandstack12,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"10",&bandstack10,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
- {"50",&bandstack50,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
+ {{"160",&bandstack160,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"80",&bandstack80,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"60",&bandstack60,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"40",&bandstack40,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"30",&bandstack30,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"20",&bandstack20,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"18",&bandstack18,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"15",&bandstack15,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"12",&bandstack12,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"10",&bandstack10,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
+ {"50",&bandstack50,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8},
#ifdef LIMESDR
{"70",&bandstack70,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
{"144",&bandstack144,0,0,0,0,0,ALEX_ATTENUATION_0dB,30},
sprintf(name,"band.%d.alexAttenuation",b);
setProperty(name,value);
- sprintf(value,"%d",bands[b].pa_calibration);
+ sprintf(value,"%f",bands[b].pa_calibration);
sprintf(name,"band.%d.pa_calibration",b);
setProperty(name,value);
sprintf(name,"band.%d.pa_calibration",b);
value=getProperty(name);
- if(value) bands[b].pa_calibration=atoi(value);
+ if(value) bands[b].pa_calibration=atof(value);
+ if(bands[b].pa_calibration<38.8 || bands[b].pa_calibration>100.0) {
+ bands[b].pa_calibration=38.8;
+ }
sprintf(name,"band.%d.OCrx",b);
value=getProperty(name);
int alexRxAntenna;
int alexTxAntenna;
int alexAttenuation;
- int pa_calibration;
+ double pa_calibration;
};
typedef struct _BAND BAND;
if(function || tune) {
// tune drive
double d=getTuneDrive();
- d+=(double)pos/100.0;
+ d+=(double)pos;
if(d<0.0) {
d=0.0;
- } else if(d>1.0) {
- d=1.0;
+ } else if(d>100.0) {
+ d=100.0;
}
set_tune(d);
} else {
// drive
double d=getDrive();
- d+=(double)pos/100.0;
+ d+=(double)pos;
if(d<0.0) {
d=0.0;
- } else if(d>1.0) {
- d=1.0;
+ } else if(d>100.0) {
+ d=100.0;
}
set_drive(d);
}
radioRestoreState();
+ fprintf(stderr,"malloc samples\n");
if(radio->protocol==NEW_PROTOCOL) {
samples=malloc(display_width*sizeof(float)*2*4); // 192 -> 48
} else {
}
//splash_status("Initializing wdsp ...");
+ fprintf(stderr,"wdsp_init\n");
wdsp_init(0,display_width,radio->protocol);
switch(radio->protocol) {
case ORIGINAL_PROTOCOL:
splash_status("Initializing old protocol ...");
+ fprintf(stderr,"old_protocol_init\n");
old_protocol_init(0,display_width);
break;
case NEW_PROTOCOL:
splash_status("Initializing new protocol ...");
+ fprintf(stderr,"new_protocol_init\n");
new_protocol_init(0,display_width);
break;
#ifdef LIMESDR
#endif
}
+ fprintf(stderr,"gpio_init\n");
splash_status("Initializing GPIO ...");
#ifdef GPIO
if(gpio_init()<0) {
tx_out_of_band=tx_out_of_band==1?0:1;
}
+static void tone_value_changed_cb(GtkWidget *widget, gpointer data) {
+ tone_level=gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget));
+ SetTXAPostGenToneMag(CHANNEL_TX,tone_level);
+}
+
+static void tx_cfir_cb(GtkWidget *widget, gpointer data) {
+ tx_cfir=tx_cfir==1?0:1;
+ SetTXACFIRRun(CHANNEL_TX, tx_cfir);
+}
+
+static void tx_alc_cb(GtkWidget *widget, gpointer data) {
+ tx_alc=tx_alc==1?0:1;
+ SetTXAALCSt(CHANNEL_TX, tx_alc);
+}
+
+static void tx_leveler_cb(GtkWidget *widget, gpointer data) {
+ tx_leveler=tx_leveler==1?0:1;
+ SetTXALevelerSt(CHANNEL_TX, tx_leveler);
+}
+
static void pa_value_changed_cb(GtkWidget *widget, gpointer data) {
BAND *band=(BAND *)data;
- band->pa_calibration=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
+ band->pa_calibration=gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget));
+ calcDriveLevel();
+ calcTuneDriveLevel();
}
static gboolean exit_pressed_event_cb (GtkWidget *widget,
id=gtk_notebook_append_page(GTK_NOTEBOOK(notebook),dsp_grid,dsp_label);
if(protocol==ORIGINAL_PROTOCOL || protocol==NEW_PROTOCOL) {
- GtkWidget *tx_label=gtk_label_new("PA Gain");
+ GtkWidget *tx_label=gtk_label_new("PA Gain (dB)");
GtkWidget *tx_grid=gtk_grid_new();
gtk_grid_set_row_homogeneous(GTK_GRID(tx_grid),TRUE);
gtk_grid_set_column_spacing (GTK_GRID(tx_grid),10);
gtk_widget_show(band_label);
gtk_grid_attach(GTK_GRID(tx_grid),band_label,(i/6)*2,i%6,1,1);
- GtkWidget *pa_r=gtk_spin_button_new_with_range(0.0,100.0,1.0);
+ GtkWidget *pa_r=gtk_spin_button_new_with_range(38.8,100.0,0.1);
//gtk_widget_override_font(pa_r, pango_font_description_from_string("Arial 18"));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(pa_r),(double)band->pa_calibration);
gtk_widget_show(pa_r);
gtk_grid_attach(GTK_GRID(tx_grid),tx_out_of_band_b,0,7,4,1);
g_signal_connect(tx_out_of_band_b,"toggled",G_CALLBACK(tx_out_of_band_cb),NULL);
+/*
+ GtkWidget *tx_cfir_b=gtk_check_button_new_with_label("TX CFIR");
+ //gtk_widget_override_font(tx_out_of_band_b, pango_font_description_from_string("Arial 18"));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tx_cfir_b), tx_cfir);
+ gtk_widget_show(tx_cfir_b);
+ gtk_grid_attach(GTK_GRID(tx_grid),tx_cfir_b,4,7,4,1);
+ g_signal_connect(tx_cfir_b,"toggled",G_CALLBACK(tx_cfir_cb),NULL);
+
+ GtkWidget *tx_alc_b=gtk_check_button_new_with_label("TX ALC");
+ //gtk_widget_override_font(tx_out_of_band_b, pango_font_description_from_string("Arial 18"));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tx_alc_b), tx_alc);
+ gtk_widget_show(tx_alc_b);
+ gtk_grid_attach(GTK_GRID(tx_grid),tx_alc_b,8,7,4,1);
+ g_signal_connect(tx_alc_b,"toggled",G_CALLBACK(tx_alc_cb),NULL);
+
+ GtkWidget *tx_leveler_b=gtk_check_button_new_with_label("TX Leveler");
+ //gtk_widget_override_font(tx_out_of_band_b, pango_font_description_from_string("Arial 18"));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tx_leveler_b), tx_leveler);
+ gtk_widget_show(tx_leveler_b);
+ gtk_grid_attach(GTK_GRID(tx_grid),tx_leveler_b,12,7,4,1);
+ g_signal_connect(tx_leveler_b,"toggled",G_CALLBACK(tx_leveler_cb),NULL);
+
+ GtkWidget *tone_r=gtk_spin_button_new_with_range(0.0,1.0,0.01);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(tone_r),tone_level);
+ gtk_widget_show(tone_r);
+ gtk_grid_attach(GTK_GRID(tx_grid),tone_r,4,6,4,1);
+ g_signal_connect(tone_r,"value_changed",G_CALLBACK(tone_value_changed_cb),NULL);
+*/
id=gtk_notebook_append_page(GTK_NOTEBOOK(notebook),tx_grid,tx_label);
}
#include "freedv.h"
#endif
+#define min(x,y) (x<y?x:y)
+
#define PI 3.1415926535897932F
int data_socket;
}
void schedule_high_priority(int source) {
-//fprintf(stderr,"new_protocol: schedule_high_priority: source=%d\n",source);
sem_wait(&send_high_priority_sem);
send_high_priority=1;
sem_post(&send_high_priority_sem);
}
void schedule_general() {
-fprintf(stderr,"new_protocol: schedule_general\n");
sem_wait(&send_general_sem);
send_general=1;
sem_post(&send_general_sem);
static void new_protocol_general() {
unsigned char buffer[60];
-fprintf(stderr,"new_protocol_general: receiver=%d\n", receiver);
-
memset(buffer, 0, sizeof(buffer));
buffer[0]=general_sequence>>24;
int power=0;
if(isTransmitting()) {
- double d=drive;
if(tune) {
- d=tune_drive;
+ power=tune_drive_level;
+ } else {
+ power=drive_level;
}
- d=d*((double)band->pa_calibration/100.0);
- power=(int)(d*255.0);
}
-
+
buffer[345]=power&0xFF;
if(isTransmitting()) {
#include "psk.h"
#endif
+#define min(x,y) (x<y?x:y)
+
#define SYNC0 0
#define SYNC1 1
#define SYNC2 2
int last_ptt;
int last_dot;
int last_dash;
- double gain;
int left_sample;
int right_sample;
int mic_sample;
double left_sample_double;
double right_sample_double;
double mic_sample_double;
+ double gain=pow(10.0, mic_gain / 20.0);
if(buffer[b++]==SYNC && buffer[b++]==SYNC && buffer[b++]==SYNC) {
// extract control bytes
#ifdef FREEDV
if(mode==modeFREEDV && !tune) {
if(freedv_samples==0) {
- int sample=(int)((double)mic_sample*pow(10.0, mic_gain / 20.0));
+ int sample=(int)((double)mic_sample*gain);
int modem_samples=mod_sample_freedv(sample);
if(modem_samples!=0) {
int s;
micinputbuffer[samples*2]=0.0;
micinputbuffer[(samples*2)+1]=0.0;
} else {
- micinputbuffer[samples*2]=mic_sample_double;
- micinputbuffer[(samples*2)+1]=mic_sample_double;
+ micinputbuffer[samples*2]=mic_sample_double*gain;
+ micinputbuffer[(samples*2)+1]=mic_sample_double*gain;
}
iqinputbuffer[samples*2]=0.0;
iqinputbuffer[(samples*2)+1]=0.0;
break;
case 3:
{
- double d=(double)drive;
- if(tune) {
- d=(double)tune_drive;
- }
-
int power=0;
if(isTransmitting()) {
- BAND *band=band_get_current_band();
- d=d*((double)band->pa_calibration/100.0);
- power=(int)(d*255.0);
+ if(tune) {
+ power=tune_drive_level;
+ } else {
+ power=drive_level;
+ }
}
output_buffer[C0]=0x12;
}
fclose(f);
}
+ fprintf(stderr,"loadProperties: done\n");
}
/* --------------------------------------------------------------------------*/
int tx_out_of_band=0;
+int tx_cfir=0;
+int tx_alc=1;
+int tx_leveler=0;
+
+double tone_level=0.0;
+
int sample_rate=48000;
int filter_board=ALEX;
//int pa=PA_ENABLED;
int nr2_npe_method=0; // 0=OSMS 1=MMSE
int nr2_ae=1; // 0=disable 1=enable
-double tune_drive=0.1;
-double drive=0.6;
+double tune_drive=10;
+double drive=50;
+
+int drive_level=0;
+int tune_drive_level=0;
int receivers=2;
int adc[2]={0,1};
} else {
SetTXAPostGenToneFreq(CHANNEL_TX,(double)cw_keyer_sidetone_frequency);
}
- SetTXAPostGenToneMag(CHANNEL_TX,2.0);
+ //if(protocol==ORIGINAL_PROTOCOL) {
+ SetTXAPostGenToneMag(CHANNEL_TX,0.3);
+ //} else {
+ // SetTXAPostGenToneMag(CHANNEL_TX,0.99999);
+ //}
SetTXAPostGenRun(CHANNEL_TX,1);
SetChannelState(CHANNEL_RX0,0,1);
SetChannelState(CHANNEL_TX,1,0);
return drive;
}
+static int calcLevel(double d) {
+ int level=0;
+ BAND *band=band_get_current_band();
+ double target_dbm = 10.0 * log10(d * 1000.0);
+ double gbb=band->pa_calibration;
+ target_dbm-=gbb;
+ double target_volts = sqrt(pow(10, target_dbm * 0.1) * 0.05);
+ double volts=min((target_volts / 0.8), 1.0);
+ double v=volts*(1.0/0.98);
+
+ if(v<0.0) {
+ v=0.0;
+ } else if(v>1.0) {
+ v=1.0;
+ }
+
+ level=(int)(v*255.0);
+ return level;
+}
+
+void calcDriveLevel() {
+ drive_level=calcLevel(drive);
+}
+
void setDrive(double value) {
drive=value;
+ calcDriveLevel();
if(protocol==NEW_PROTOCOL) {
schedule_high_priority(6);
}
return tune_drive;
}
+void calcTuneDriveLevel() {
+ tune_drive_level=calcLevel(tune_drive);
+}
+
void setTuneDrive(double value) {
tune_drive=value;
+
+ calcTuneDriveLevel();
if(protocol==NEW_PROTOCOL) {
schedule_high_priority(7);
}
void radioRestoreState() {
char *value;
+fprintf(stderr,"radioRestoreState: %s\n",property_path);
sem_wait(&property_sem);
loadProperties(property_path);
value=getProperty("volume");
if(value) volume=atof(value);
value=getProperty("drive");
- if(value) {drive=atof(value); if(drive>1.0) drive=1.0;}
+ if(value) drive=atof(value);
value=getProperty("tune_drive");
- if(value) {tune_drive=atof(value); if(tune_drive>1.0) tune_drive=1.0;}
+ if(value) tune_drive=atof(value);
value=getProperty("mic_gain");
- if(value) { mic_gain=atof(value); if(mic_gain<1.0) mic_gain=0.0; }
+ if(value) mic_gain=atof(value);
value=getProperty("mic_boost");
if(value) mic_boost=atof(value);
value=getProperty("mic_linein");
value=getProperty("n_selected_input_device");
if(value) n_selected_input_device=atoi(value);
bandRestoreState();
+
sem_post(&property_sem);
}
extern int tx_out_of_band;
+extern int tx_cfir;
+extern int tx_alc;
+extern int tx_leveler;
+
+extern double tone_level;
+
extern int sample_rate;
extern int filter_board;
extern int pa;
extern double tune_drive;
extern double drive;
+extern int tune_drive_level;
+extern int drive_level;
+
int receivers;
int adc[2];
extern int getMox();
extern void setTune(int state);
extern int getTune();
-double getDrive();
-void setDrive(double d);
-double getTuneDrive();
-void setTuneDrive(double d);
-
-void set_attenuation(int value);
-int get_attenuation();
-void set_alex_rx_antenna(int v);
-void set_alex_tx_antenna(int v);
-void set_alex_attenuation(int v);
+extern double getDrive();
+extern void setDrive(double d);
+extern void calcDriveLevel();
+extern double getTuneDrive();
+extern void setTuneDrive(double d);
+extern void calcTuneDriveLevel();
+
+extern void set_attenuation(int value);
+extern int get_attenuation();
+extern void set_alex_rx_antenna(int v);
+extern void set_alex_tx_antenna(int v);
+extern void set_alex_attenuation(int v);
extern int isTransmitting();
static void micgain_value_changed_cb(GtkWidget *widget, gpointer data) {
mic_gain=gtk_range_get_value(GTK_RANGE(widget));
double gain=pow(10.0, mic_gain / 20.0);
- SetTXAPanelGain1(CHANNEL_TX,gain);
+ if(protocol==NEW_PROTOCOL) {
+ SetTXAPanelGain1(CHANNEL_TX,gain);
+ }
}
void set_mic_gain(double value) {
mic_gain=value;
double gain=pow(10.0, mic_gain / 20.0);
- SetTXAPanelGain1(CHANNEL_TX,gain);
+ if(protocol==NEW_PROTOCOL) {
+ SetTXAPanelGain1(CHANNEL_TX,gain);
+ }
if(display_sliders) {
gtk_range_set_value (GTK_RANGE(mic_gain_scale),mic_gain);
} else {
void set_drive(double value) {
setDrive(value);
if(display_sliders) {
- gtk_range_set_value (GTK_RANGE(drive_scale),value*100.0);
+ gtk_range_set_value (GTK_RANGE(drive_scale),value);
} else {
if(scale_status!=DRIVE) {
if(scale_status!=NONE) {
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
drive_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.00);
gtk_widget_set_size_request (drive_scale, 400, 30);
- gtk_range_set_value (GTK_RANGE(drive_scale),value*100.0);
+ gtk_range_set_value (GTK_RANGE(drive_scale),value);
gtk_widget_show(drive_scale);
gtk_container_add(GTK_CONTAINER(content),drive_scale);
scale_timer=g_timeout_add(2000,scale_timeout_cb,NULL);
int result=gtk_dialog_run(GTK_DIALOG(scale_dialog));
} else {
g_source_remove(scale_timer);
- gtk_range_set_value (GTK_RANGE(drive_scale),value*100.0);
+ gtk_range_set_value (GTK_RANGE(drive_scale),value);
scale_timer=g_timeout_add(2000,scale_timeout_cb,NULL);
}
}
}
static void drive_value_changed_cb(GtkWidget *widget, gpointer data) {
- setDrive(gtk_range_get_value(GTK_RANGE(drive_scale))/100.0);
+ setDrive(gtk_range_get_value(GTK_RANGE(drive_scale)));
}
void set_tune(double value) {
setTuneDrive(value);
if(display_sliders) {
- gtk_range_set_value (GTK_RANGE(tune_scale),value*100.0);
+ gtk_range_set_value (GTK_RANGE(tune_scale),value);
} else {
if(scale_status!=TUNE_DRIVE) {
if(scale_status!=NONE) {
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
tune_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.00);
gtk_widget_set_size_request (tune_scale, 400, 30);
- gtk_range_set_value (GTK_RANGE(tune_scale),value*100.0);
+ gtk_range_set_value (GTK_RANGE(tune_scale),value);
gtk_widget_show(tune_scale);
gtk_container_add(GTK_CONTAINER(content),tune_scale);
scale_timer=g_timeout_add(2000,scale_timeout_cb,NULL);
int result=gtk_dialog_run(GTK_DIALOG(scale_dialog));
} else {
g_source_remove(scale_timer);
- gtk_range_set_value (GTK_RANGE(tune_scale),value*100.0);
+ gtk_range_set_value (GTK_RANGE(tune_scale),value);
scale_timer=g_timeout_add(2000,scale_timeout_cb,NULL);
}
}
}
static void tune_value_changed_cb(GtkWidget *widget, gpointer data) {
- setTuneDrive(gtk_range_get_value(GTK_RANGE(tune_scale))/100.0);
+ setTuneDrive(gtk_range_get_value(GTK_RANGE(tune_scale)));
}
GtkWidget *sliders_init(int my_width, int my_height, GtkWidget* parent) {
gtk_grid_attach(GTK_GRID(sliders),drive_label,3,1,1,1);
drive_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.0);
- gtk_range_set_value (GTK_RANGE(drive_scale),getDrive()*100.0);
+ gtk_range_set_value (GTK_RANGE(drive_scale),getDrive());
gtk_widget_show(drive_scale);
gtk_grid_attach(GTK_GRID(sliders),drive_scale,4,1,2,1);
g_signal_connect(G_OBJECT(drive_scale),"value_changed",G_CALLBACK(drive_value_changed_cb),NULL);
gtk_grid_attach(GTK_GRID(sliders),tune_label,6,1,1,1);
tune_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.0);
- gtk_range_set_value (GTK_RANGE(tune_scale),getTuneDrive()*100.0);
+ gtk_range_set_value (GTK_RANGE(tune_scale),getTuneDrive());
gtk_widget_show(tune_scale);
gtk_grid_attach(GTK_GRID(sliders),tune_scale,7,1,2,1);
g_signal_connect(G_OBJECT(tune_scale),"value_changed",G_CALLBACK(tune_value_changed_cb),NULL);
vfo_update(NULL);
setFrequency(entry->frequencyA);
+
+ calcDriveLevel();
+ calcTuneDriveLevel();
}
void band_cb(GtkWidget *widget, gpointer data) {
set_alex_tx_antenna(band->alexTxAntenna);
set_alex_attenuation(band->alexAttenuation);
vfo_update(NULL);
+
+ calcDriveLevel();
+ calcTuneDriveLevel();
}
}
SetTXABandpassWindow(tx, 1);
SetTXABandpassRun(tx, 1);
- SetTXACFIRRun(tx, 1);
+ SetTXACFIRRun(tx, protocol==NEW_PROTOCOL?1:0); // turned in if new protocol
SetTXAEQRun(tx, 0);
SetTXACTCSSRun(tx, 0);
SetTXAAMSQRun(tx, 0);
SetTXACompressorRun(tx, 0);
SetTXAosctrlRun(tx, 0);
+ SetTXAALCAttack(tx, 1);
SetTXAALCDecay(tx, 10);
- SetTXALevelerTop(tx, 15.0);
+ SetTXAALCSt(tx, tx_alc);
+
+ SetTXALevelerAttack(tx, 1);
SetTXALevelerDecay(tx, 500);
- SetTXALevelerSt(tx, 1);
+ SetTXALevelerTop(tx, 5.0);
+ SetTXALevelerSt(tx, tx_leveler);
SetTXAPreGenMode(tx, 0);
SetTXAPreGenToneMag(tx, 0.0);
SetTXAPreGenRun(tx, 0);
SetTXAPostGenMode(tx, 0);
- SetTXAPostGenToneMag(tx, 0.0);
+ SetTXAPostGenToneMag(tx, tone_level);
SetTXAPostGenToneFreq(tx, 0.0);
SetTXAPostGenRun(tx, 0);
- SetTXAPanelRun(tx, 1);
- double gain=pow(10.0, mic_gain / 20.0);
- SetTXAPanelGain1(tx,gain);
+ if(protocol==NEW_PROTOCOL) {
+ double gain=pow(10.0, mic_gain / 20.0);
+ SetTXAPanelGain1(tx,gain);
+ //SetTXAPanelRun(tx, protocol==NEW_PROTOCOL?1:0);
+ }
//SetChannelState(tx,1,0);
}
initAnalyzer(CHANNEL_PSK,PSK_BUFFER_SIZE);
#endif
+ calcDriveLevel();
+ calcTuneDriveLevel();
+
}
void wdsp_new_sample_rate(int rate) {