<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>CFBundleIdentifier</key>
+ <key>CFBundleIdentifier</key>
<string>piHPSDR</string>
<key>CFBundleExecutable</key>
<string>pihpsdr</string>
<string>hpsdr.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
- <key>CFBundleSignature</key>
+ <key>CFBundleSignature</key>
<string>BNDL</string>
- <key>NSMicrophoneUsageDescription</key>
- <string>Allow for using Sound input devices</string>
+ <key>NSMicrophoneUsageDescription</key>
+ <string>Allow for using Sound input devices</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
</dict>
</plist>
this=`dirname $0`
+#
+# If the things below fail for some reason, stay in $HOME
+#
cd $HOME
-mkdir .pihpsdr
-cd .pihpsdr # if this fails, stay in $HOME
+
+localdir="$HOME/Library/Application Support/piHPSDR"
+
+echo $localdir > $HOME/test.out
+
+mkdir -p "$localdir"
+cd "$localdir"
cp $this/../Resources/hpsdr.png .
exec $this/pihpsdr-bin
}
GtkWidget *label=gtk_label_new(text);
- gtk_widget_override_font(label, pango_font_description_from_string("FreeMono 12"));
+ gtk_widget_override_font(label, pango_font_description_from_string("Sans 11"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_show(label);
gtk_grid_attach(GTK_GRID(grid),label,0,i,3,1);
GtkWidget *start_button=gtk_button_new_with_label("Start");
- gtk_widget_override_font(start_button, pango_font_description_from_string("FreeMono 18"));
+ gtk_widget_override_font(start_button, pango_font_description_from_string("Sans 16"));
gtk_widget_show(start_button);
gtk_grid_attach(GTK_GRID(grid),start_button,3,i,1,1);
g_signal_connect(start_button,"button_press_event",G_CALLBACK(start_cb),(gpointer)d);
gtk_widget_set_sensitive(start_button, FALSE);
} else {
apps_combobox[i] = gtk_combo_box_text_new();
- gtk_widget_override_font(apps_combobox[i],
- pango_font_description_from_string("FreeMono 12"));
+ gtk_widget_override_font(apps_combobox[i], pango_font_description_from_string("Sans 11"));
// We want the default selection priority for the STEMlab app to be
// RP-Trx > HAMlab-Trx > Pavel-Trx > Pavel-Rx, so we add in decreasing order and
// always set the newly added entry to be active.
return 0;
}
+int ext_set_compression(void *data) {
+ set_compression(transmitter);
+ return 0;
+}
+
int ext_vfo_a_swap_b(void *data) {
vfo_a_swap_b();
return 0;
int ext_update_att_preamp(void *data);
int ext_set_alex_attenuation(void *data);
int ext_set_attenuation_value(void *data);
+int ext_set_compression(void *data);
static double last_q_sample=0.0;
static int txptr=0;
-//
-// Unfortunately, the code number of the gear
-// differes in old and new protocol
-//
-
-#define DEVICE_ATLAS 0
-#define DEVICE_HERMES 1
-#define DEVICE_HERMES2 2
-#define DEVICE_ANGELIA 4
-#define DEVICE_ORION 5
-#define DEVICE_HERMES_LITE 6
-#define DEVICE_ORION2 10
-#define DEVICE_C25 100
-
-#define NEW_DEVICE_ATLAS 0
-#define NEW_DEVICE_HERMES 1
-#define NEW_DEVICE_HERMES2 2
-#define NEW_DEVICE_ANGELIA 3
-#define NEW_DEVICE_ORION 4
-#define NEW_DEVICE_ORION2 5
-#define NEW_DEVICE_HERMES_LITE 6
-
int main(int argc, char *argv[])
{
int i, j, size;
//
///////////////////////////////////////////////////////////////////////////
+//
+// Unfortunately, the code number of the gear
+// differes in old and new protocol
+//
+
+#define DEVICE_ATLAS 0
+#define DEVICE_HERMES 1
+#define DEVICE_HERMES2 2
+#define DEVICE_ANGELIA 4
+#define DEVICE_ORION 5
+#define DEVICE_HERMES_LITE 6
+#define DEVICE_ORION2 10
+#define DEVICE_C25 100
+
+#define NEW_DEVICE_ATLAS 0
+#define NEW_DEVICE_HERMES 1
+#define NEW_DEVICE_HERMES2 2
+#define NEW_DEVICE_ANGELIA 3
+#define NEW_DEVICE_ORION 4
+#define NEW_DEVICE_ORION2 5
+#define NEW_DEVICE_HERMES_LITE 6
+
EXTERN int OLDDEVICE;
EXTERN int NEWDEVICE;
//
// Constants defining the distortion of the TX signal
+// These give about -24 dBc at full drive, that is
+// about the value a reasonable amp gives.
//
#define IM3a 0.60
#define IM3b 0.20
if (rx->preamp) level -= 18.0;
if (rx->dither) level -= 18.0;
}
+ //
+ // Assume that alex_attenuation is set correctly if we have an ALEX board
+ //
+ if (filter_board == ALEX && rx->adc == 0) {
+ level += 10*rx->alex_attenuation;
+ }
+
offset=210.0;
int i;
if (rx->preamp) level -= 18.0;
if (rx->dither) level -= 18.0;
}
+
+ //
+ // Assume that alex_attenuation is set correctly if we have an ALEX board
+ //
+ if (filter_board == ALEX && rx->adc == 0) {
+ level += 10*rx->alex_attenuation;
+ }
+
if(meter_width>=114) {
//int db=meter_width/114; // S9+60 (9*6)+60
//if(db>2) db=2;
case ATT: // Key for ALEX attenuator, wheel or knob for slider
switch(type) {
case MIDI_KEY:
- new=active_receiver->alex_attenuation + 1;
- if (new > 3) new=0;
- g_idle_add(ext_set_alex_attenuation, (gpointer)(uintptr_t)new);
- g_idle_add(ext_update_att_preamp, NULL);
+ if (filter_board == ALEX && active_receiver->adc == 0) {
+ new=active_receiver->alex_attenuation + 1;
+ if (new > 3) new=0;
+ g_idle_add(ext_set_alex_attenuation, (gpointer)(uintptr_t)new);
+ g_idle_add(ext_update_att_preamp, NULL);
+ }
break;
case MIDI_WHEEL:
case MIDI_KNOB:
transmitter->compressor_level=dnew;
if (dnew < 0.5) transmitter->compressor=0;
if (dnew > 0.5) transmitter->compressor=1;
- g_idle_add(ext_vfo_update, NULL);
+ g_idle_add(ext_set_compression, NULL);
break;
case NB:
// cycle through NoiseBlanker settings
if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
perror("***** ERROR: RX specific: bind");
+ close(sock);
return NULL;
}
if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
perror("***** ERROR: TXspec: bind");
+ close(sock);
return NULL;
}
if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
perror("***** ERROR: HP: bind");
+ close(sock);
return NULL;
}
rc=buffer[1443];
if (rc != stepatt0) {
stepatt0=rc;
- rxatt0_dbl=pow(10.0, -0.05*stepatt0);
fprintf(stderr,"HP: StepAtt0 = %d\n", stepatt0);
}
+ // rxatt0 depends both on ALEX att and Step Att, so re-calc. it each time
+ if (NEWDEVICE == NEW_DEVICE_ORION2) {
+ rxatt0_dbl=pow(10.0, -0.05*stepatt0);
+ } else {
+ rxatt0_dbl=pow(10.0, -0.05*(stepatt0+10*alex0[14]+20*alex0[13]));
+ }
}
return NULL;
}
wait=238000000L/rxrate[myddc]; // time for these samples in nano-secs
}
//
- // ADC0 RX: noise + 800Hz signal at -100 dBm
+ // ADC0 RX: noise + 800Hz signal at -73 dBm
// ADC0 TX: noise + distorted TX signal
// ADC1 RX: noise
// ADC1 TX: HERMES only: original TX signal
i1sample = irsample * 0.2899;
q1sample = qrsample * 0.2899;
} else if (myadc == 0) {
- i0sample += toneItab[tonept] * 0.00001 * rxatt0_dbl;
- q0sample += toneQtab[tonept] * 0.00001 * rxatt0_dbl;
+ i0sample += toneItab[tonept] * 0.0002239 * rxatt0_dbl;
+ q0sample += toneQtab[tonept] * 0.0002239 * rxatt0_dbl;
tonept += decimation; if (tonept >= LENTONE) tonept=0;
}
if (diversity && !sync && myadc == 0) {
}
txlevel=sum * txdrv_dbl * txdrv_dbl * 0.0041667;
}
+ close(sock);
return NULL;
}
if(transmitter->auto_on) {
transmitter->attenuation=0;
}
- SetPSControl(transmitter->id, 0, 0, 1, 0);
+ if (transmitter->puresignal) {
+ SetPSControl(transmitter->id, 0, 0, 1, 0);
+ }
}
static void feedback_cb(GtkWidget *widget, gpointer data) {
}
static void reset_cb(GtkWidget *widget, gpointer data) {
- SetPSControl(transmitter->id, 1, 0, 0, 0);
+ if (transmitter->puresignal) {
+ SetPSControl(transmitter->id, 1, 0, 0, 0);
+ }
}
static void twotone_cb(GtkWidget *widget, gpointer data) {
}
}
+//
+// There is an error here.
+// The alex att should not be associated with a receiver,
+// but with an ADC. *all* receivers bound to that ADC
+// will experience the same attenuation.
+//
+// This means, alex_attenuation should not be stored in thre
+// receiver, but separately (as is the case with adc_attenuation).
+//
void set_alex_attenuation(int v) {
if(active_receiver->id==0) {
active_receiver->alex_attenuation=v;
// The CHARLY25 board (with RedPitaya) has no support for dither or random,
// so those are left out. For Charly25, PreAmps and Alex Attenuator are controlled via
// the sliders menu.
- // On SDRs other than CHARLY25, preamps or Alex attenuators may be present or not, and we
- // do not try to find out whether they are. This would overload the code, and we then
- // also must have a menu to check e.g. which ANAN model is actually present.
- // Instead, we offer these checkboxes in either case.
//
- // NOTE: Preamps are not present on most current HPSDR models, and ALEX attenuators
- // are not present e.g. in ANAN-7000.
+ // Preamps are not switchable on all SDR hardware I know of, so this is commented out
+ //
+ // We assume Alex attenuators are present if we have an ALEX board and no Orion2
+ // (ANAN-7000/8000 do not have these), and if the RX is fed by the first ADC.
//
if (filter_board != CHARLY25) {
- switch(protocol) {
- case ORIGINAL_PROTOCOL:
- case NEW_PROTOCOL:
- {
- GtkWidget *dither_b=gtk_check_button_new_with_label("Dither");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dither_b), active_receiver->dither);
- gtk_grid_attach(GTK_GRID(grid),dither_b,x,2,1,1);
- g_signal_connect(dither_b,"toggled",G_CALLBACK(dither_cb),NULL);
-
- GtkWidget *random_b=gtk_check_button_new_with_label("Random");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (random_b), active_receiver->random);
- gtk_grid_attach(GTK_GRID(grid),random_b,x,3,1,1);
- g_signal_connect(random_b,"toggled",G_CALLBACK(random_cb),NULL);
-
- GtkWidget *preamp_b=gtk_check_button_new_with_label("Preamp");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (preamp_b), active_receiver->preamp);
- gtk_grid_attach(GTK_GRID(grid),preamp_b,x,4,1,1);
- g_signal_connect(preamp_b,"toggled",G_CALLBACK(preamp_cb),NULL);
-
- GtkWidget *alex_att_label=gtk_label_new("Alex Attenuator");
- gtk_grid_attach(GTK_GRID(grid), alex_att_label, x, 5, 1, 1);
- GtkWidget *last_alex_att_b = NULL;
- for (i = 0; i <= 3; i++) {
- gchar button_text[] = "xx dB";
- sprintf(button_text, "%d dB", i*10);
- GtkWidget *alex_att_b=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(last_alex_att_b), button_text);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(alex_att_b), active_receiver->alex_attenuation == i);
- gtk_grid_attach(GTK_GRID(grid), alex_att_b, x, 6 + i, 1, 1);
- g_signal_connect(alex_att_b, "toggled", G_CALLBACK(alex_att_cb), (gpointer) (long) i);
- last_alex_att_b = alex_att_b;
- }
+ GtkWidget *dither_b=gtk_check_button_new_with_label("Dither");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dither_b), active_receiver->dither);
+ gtk_grid_attach(GTK_GRID(grid),dither_b,x,2,1,1);
+ g_signal_connect(dither_b,"toggled",G_CALLBACK(dither_cb),NULL);
+
+ GtkWidget *random_b=gtk_check_button_new_with_label("Random");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (random_b), active_receiver->random);
+ gtk_grid_attach(GTK_GRID(grid),random_b,x,3,1,1);
+ g_signal_connect(random_b,"toggled",G_CALLBACK(random_cb),NULL);
+
+ //GtkWidget *preamp_b=gtk_check_button_new_with_label("Preamp");
+ //gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (preamp_b), active_receiver->preamp);
+ //gtk_grid_attach(GTK_GRID(grid),preamp_b,x,4,1,1);
+ //g_signal_connect(preamp_b,"toggled",G_CALLBACK(preamp_cb),NULL);
+
+ if (filter_board == ALEX && active_receiver->adc == 0
+ && ((protocol==ORIGINAL_PROTOCOL && device != DEVICE_ORION2) || (protocol==NEW_PROTOCOL && device != NEW_DEVICE_ORION2))) {
+
+ GtkWidget *alex_att_label=gtk_label_new("Alex Attenuator");
+ gtk_grid_attach(GTK_GRID(grid), alex_att_label, x, 5, 1, 1);
+ GtkWidget *last_alex_att_b = NULL;
+ for (i = 0; i <= 3; i++) {
+ gchar button_text[] = "xx dB";
+ sprintf(button_text, "%d dB", i*10);
+ GtkWidget *alex_att_b=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(last_alex_att_b), button_text);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(alex_att_b), active_receiver->alex_attenuation == i);
+ gtk_grid_attach(GTK_GRID(grid), alex_att_b, x, 6 + i, 1, 1);
+ g_signal_connect(alex_att_b, "toggled", G_CALLBACK(alex_att_cb), (gpointer) (long) i);
+ last_alex_att_b = alex_att_b;
}
- x++;
- break;
- default:
- break;
}
+ x++;
}
// If there is more than one ADC, let the user associate an ADC
GetRXAAGCThresh(rx->id, &thresh, 4096.0, (double)rx->sample_rate);
double knee_y=thresh+(double)adc_attenuation[rx->adc];
+ if (filter_board == ALEX && rx->adc == 0) knee_y += (double)(10*rx->alex_attenuation);
knee_y = floor((rx->panadapter_high - knee_y)
* (double) display_height
/ (rx->panadapter_high - rx->panadapter_low));
double hang_y=hang+(double)adc_attenuation[rx->adc];
+ if (filter_board == ALEX && rx->adc == 0) hang_y += (double)(10*rx->alex_attenuation);
hang_y = floor((rx->panadapter_high - hang_y)
* (double) display_height
/ (rx->panadapter_high - rx->panadapter_low));
samples[display_width-1]=-200.0;
s1=(double)samples[0]+(double)adc_attenuation[rx->adc];
+ if (filter_board == ALEX && rx->adc == 0) s1 += (double)(10*rx->alex_attenuation);
+
s1 = floor((rx->panadapter_high - s1)
* (double) display_height
/ (rx->panadapter_high - rx->panadapter_low));
cairo_move_to(cr, 0.0, s1);
for(i=1;i<display_width;i++) {
s2=(double)samples[i]+(double)adc_attenuation[rx->adc];
+ if (filter_board == ALEX && rx->adc == 0) s2 += (double)(10*rx->alex_attenuation);
s2 = floor((rx->panadapter_high - s2)
* (double) display_height
/ (rx->panadapter_high - rx->panadapter_low));
// We should also set the attenuation for use in meter.c
if (filter_board == CHARLY25) {
char id[] = "x";
- if (active_receiver->id != 0) {
+ if (active_receiver->adc != 0) {
active_receiver->alex_attenuation=0;
active_receiver->preamp=0;
active_receiver->dither=0;
static void c25_att_combobox_changed(GtkWidget *widget, gpointer data) {
int val = atoi(gtk_combo_box_get_active_id(GTK_COMBO_BOX(widget)));
- if (active_receiver->id == 0) {
+ if (active_receiver->adc == 0) {
// this button is only valid for the first receiver
// store attenuation, such that in meter.c the correct level is displayed
adc_attenuation[active_receiver->adc] = 12*val;
scale_dialog=gtk_dialog_new_with_buttons("Drive",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
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_override_font(drive_scale, pango_font_description_from_string("Sans 10"));
gtk_widget_set_size_request (drive_scale, 400, 30);
gtk_range_set_value (GTK_RANGE(drive_scale),value);
gtk_widget_show(drive_scale);
static void compressor_value_changed_cb(GtkWidget *widget, gpointer data) {
transmitter_set_compressor_level(transmitter,gtk_range_get_value(GTK_RANGE(widget)));
+ // This value is now also reflected in the VFO panel
+ g_idle_add(ext_vfo_update, NULL);
+
}
static void compressor_enable_cb(GtkWidget *widget, gpointer data) {
transmitter_set_compressor(transmitter,gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)));
+ // This value is now also reflected in the VFO panel
+ g_idle_add(ext_vfo_update, NULL);
+
}
void set_squelch() {
setSquelch(active_receiver);
+#ifndef COMPRESSION_SLIDER
if(display_sliders) {
gtk_range_set_value (GTK_RANGE(squelch_scale),active_receiver->squelch);
} else {
+#endif
if(scale_status!=SQUELCH) {
if(scale_status!=NONE) {
g_source_remove(scale_timer);
scale_dialog=gtk_dialog_new_with_buttons("Squelch",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
squelch_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.00);
+ //gtk_widget_override_font(squelch_scale, pango_font_description_from_string("Sans 10"));
gtk_range_set_value (GTK_RANGE(squelch_scale),active_receiver->squelch);
gtk_widget_set_size_request (squelch_scale, 400, 30);
gtk_widget_show(squelch_scale);
gtk_range_set_value (GTK_RANGE(squelch_scale),active_receiver->squelch);
scale_timer=g_timeout_add(2000,scale_timeout_cb,NULL);
}
+#ifndef COMPRESSION_SLIDER
}
+#endif
}
void set_compression(TRANSMITTER* tx) {
-// if(display_sliders) {
-// gtk_range_set_value (GTK_RANGE(comp_scale),tx->compressor_level);
-// } else {
+#ifdef COMPRESSION_SLIDER
+ if(display_sliders) {
+ gtk_range_set_value (GTK_RANGE(comp_scale),tx->compressor_level);
+ } else {
+#endif
if(scale_status!=COMP) {
if(scale_status!=NONE) {
g_source_remove(scale_timer);
scale_dialog=gtk_dialog_new_with_buttons("COMP",GTK_WINDOW(top_window),GTK_DIALOG_DESTROY_WITH_PARENT,NULL,NULL);
GtkWidget *content=gtk_dialog_get_content_area(GTK_DIALOG(scale_dialog));
comp_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 20.0, 1.00);
+ //gtk_widget_override_font(comp_scale, pango_font_description_from_string("Sans 10"));
gtk_range_set_value (GTK_RANGE(comp_scale),tx->compressor_level);
gtk_widget_set_size_request (comp_scale, 400, 30);
gtk_widget_show(comp_scale);
gtk_range_set_value (GTK_RANGE(comp_scale),tx->compressor_level);
scale_timer=g_timeout_add(2000,scale_timeout_cb,NULL);
}
- //}
+#ifdef COMPRESSION_SLIDER
+ }
+#endif
+ // Now we are also displaying the TX compressor value in the VFO panel
+ g_idle_add(ext_vfo_update, NULL);
}
GtkWidget *sliders_init(int my_width, int my_height) {
gtk_grid_set_column_homogeneous(GTK_GRID(sliders),TRUE);
af_gain_label=gtk_label_new("AF:");
+ //gtk_widget_override_font(af_gain_label, pango_font_description_from_string("Sans 11"));
gtk_widget_show(af_gain_label);
gtk_grid_attach(GTK_GRID(sliders),af_gain_label,0,0,1,1);
af_gain_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.00);
+ //gtk_widget_override_font(af_gain_scale, pango_font_description_from_string("Sans 10"));
gtk_range_set_value (GTK_RANGE(af_gain_scale),active_receiver->volume*100.0);
gtk_widget_show(af_gain_scale);
gtk_grid_attach(GTK_GRID(sliders),af_gain_scale,1,0,2,1);
g_signal_connect(G_OBJECT(af_gain_scale),"value_changed",G_CALLBACK(afgain_value_changed_cb),NULL);
agc_gain_label=gtk_label_new("AGC:");
+ //gtk_widget_override_font(agc_gain_label, pango_font_description_from_string("Sans 11"));
gtk_widget_show(agc_gain_label);
gtk_grid_attach(GTK_GRID(sliders),agc_gain_label,3,0,1,1);
agc_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,-20.0, 120.0, 1.0);
+ //gtk_widget_override_font(agc_scale, pango_font_description_from_string("Sans 10"));
gtk_range_set_value (GTK_RANGE(agc_scale),active_receiver->agc_gain);
gtk_widget_show(agc_scale);
gtk_grid_attach(GTK_GRID(sliders),agc_scale,4,0,2,1);
sprintf(title,"ATT (dB)"/*,active_receiver->adc*/);
#endif
attenuation_label=gtk_label_new(title);
+ //gtk_widget_override_font(attenuation_label, pango_font_description_from_string("Sans 11"));
gtk_widget_show(attenuation_label);
gtk_grid_attach(GTK_GRID(sliders),attenuation_label,6,0,1,1);
attenuation_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 31.0, 1.0);
gtk_range_set_value (GTK_RANGE(attenuation_scale),adc_attenuation[active_receiver->adc]);
#endif
+ //gtk_widget_override_font(attenuation_scale, pango_font_description_from_string("Sans 10"));
gtk_widget_show(attenuation_scale);
gtk_grid_attach(GTK_GRID(sliders),attenuation_scale,7,0,2,1);
g_signal_connect(G_OBJECT(attenuation_scale),"value_changed",G_CALLBACK(attenuation_value_changed_cb),NULL);
c25_att_preamp_label = gtk_label_new("Att/PreAmp");
+ //gtk_widget_override_font(c25_att_preamp_label, pango_font_description_from_string("Sans 11"));
gtk_grid_attach(GTK_GRID(sliders), c25_att_preamp_label, 6, 0, 1, 1);
c25_att_combobox = gtk_combo_box_text_new();
+ //gtk_widget_override_font(c25_att_combobox, pango_font_description_from_string("Sans 10"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_att_combobox), "0", "0 dB");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_att_combobox), "1", "-12 dB");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_att_combobox), "2", "-24 dB");
g_signal_connect(G_OBJECT(c25_att_combobox), "changed", G_CALLBACK(c25_att_combobox_changed), NULL);
c25_preamp_combobox = gtk_combo_box_text_new();
+ //gtk_widget_override_font(c25_preamp_combobox, pango_font_description_from_string("Sans 10"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_preamp_combobox), "0", "0 dB");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_preamp_combobox), "1", "18 dB");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(c25_preamp_combobox), "2", "36 dB");
mic_gain_label=gtk_label_new(mic_linein?"Linein:":"Mic (dB):");
+ //gtk_widget_override_font(mic_gain_label, pango_font_description_from_string("Sans 11"));
gtk_grid_attach(GTK_GRID(sliders),mic_gain_label,0,1,1,1);
mic_gain_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,mic_linein?0.0:-10.0,mic_linein?31.0:50.0, 1.0);
+ //gtk_widget_override_font(mic_gain_scale, pango_font_description_from_string("Sans 10"));
gtk_range_set_value (GTK_RANGE(mic_gain_scale),mic_linein?linein_gain:mic_gain);
gtk_grid_attach(GTK_GRID(sliders),mic_gain_scale,1,1,2,1);
g_signal_connect(G_OBJECT(mic_gain_scale),"value_changed",G_CALLBACK(micgain_value_changed_cb),NULL);
drive_label=gtk_label_new("Drive:");
+ //gtk_widget_override_font(drive_label, pango_font_description_from_string("Sans 11"));
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_widget_override_font(drive_scale, pango_font_description_from_string("Sans 10"));
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);
+#ifndef COMPRESSION_SLIDER
squelch_label=gtk_label_new("Squelch:");
+ //gtk_widget_override_font(squelch_label, pango_font_description_from_string("Sans 11"));
gtk_widget_show(squelch_label);
gtk_grid_attach(GTK_GRID(sliders),squelch_label,6,1,1,1);
squelch_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 100.0, 1.0);
+ //gtk_widget_override_font(squelch_scale, pango_font_description_from_string("Sans 10"));
gtk_range_set_value (GTK_RANGE(squelch_scale),active_receiver->squelch);
gtk_widget_show(squelch_scale);
gtk_grid_attach(GTK_GRID(sliders),squelch_scale,7,1,2,1);
gtk_widget_show(squelch_enable);
gtk_grid_attach(GTK_GRID(sliders),squelch_enable,9,1,1,1);
g_signal_connect(squelch_enable,"toggled",G_CALLBACK(squelch_enable_cb),NULL);
+#else
+ comp_label=gtk_label_new("TX Cmpr:");
+ //gtk_widget_override_font(comp_label, pango_font_description_from_string("Sans 11"));
+ gtk_widget_show(comp_label);
+ gtk_grid_attach(GTK_GRID(sliders),comp_label,6,1,1,1);
+
+ comp_scale=gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL,0.0, 20.0, 1.0);
+ //gtk_widget_override_font(comp_scale, pango_font_description_from_string("Sans 10"));
+ gtk_range_set_value (GTK_RANGE(comp_scale),transmitter->compressor_level);
+ gtk_widget_show(comp_scale);
+ gtk_grid_attach(GTK_GRID(sliders),comp_scale,7,1,2,1);
+ g_signal_connect(G_OBJECT(comp_scale),"value_changed",G_CALLBACK(compressor_value_changed_cb),NULL);
+
+ comp_enable=gtk_check_button_new();
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(comp_enable),transmitter->compressor);
+ gtk_widget_show(comp_enable);
+ gtk_grid_attach(GTK_GRID(sliders),comp_enable,9,1,1,1);
+ g_signal_connect(comp_enable,"toggled",G_CALLBACK(compressor_enable_cb),NULL);
+#endif
return sliders;
}
} else {
step_rb=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(step_rb),step_labels[i]);
}
- gtk_widget_override_font(step_rb, pango_font_description_from_string("FreeMono 18"));
+ gtk_widget_override_font(step_rb, pango_font_description_from_string("Sans 16"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (step_rb), steps[i]==step);
gtk_widget_show(step_rb);
gtk_grid_attach(GTK_GRID(grid),step_rb,i%5,1+(i/5),1,1);
gtk_grid_set_column_homogeneous(GTK_GRID(toolbar),TRUE);
sim_mox=gtk_button_new_with_label("Mox");
- //gtk_widget_override_font(sim_mox, pango_font_description_from_string("Arial 16"));
+ //gtk_widget_override_font(sim_mox, pango_font_description_from_string("Sans 11"));
g_signal_connect(G_OBJECT(sim_mox),"clicked",G_CALLBACK(sim_mox_cb),NULL);
gtk_grid_attach(GTK_GRID(toolbar),sim_mox,0,0,4,1);
sim_s1=gtk_button_new_with_label("Band");
gtk_widget_set_size_request (sim_s1, button_width, 0);
- //gtk_widget_override_font(sim_s1, pango_font_description_from_string("Arial 16"));
+ //gtk_widget_override_font(sim_s1, pango_font_description_from_string("Sans 11"));
g_signal_connect(G_OBJECT(sim_s1),"pressed",G_CALLBACK(sim_s1_pressed_cb),NULL);
g_signal_connect(G_OBJECT(sim_s1),"released",G_CALLBACK(sim_s1_released_cb),NULL);
gtk_grid_attach(GTK_GRID(toolbar),sim_s1,4,0,4,1);
sim_s2=gtk_button_new_with_label("BStack");
gtk_widget_set_size_request (sim_s2, button_width, 0);
- //gtk_widget_override_font(sim_s2, pango_font_description_from_string("Arial 16"));
+ //gtk_widget_override_font(sim_s2, pango_font_description_from_string("Sans 11"));
g_signal_connect(G_OBJECT(sim_s2),"pressed",G_CALLBACK(sim_s2_pressed_cb),NULL);
g_signal_connect(G_OBJECT(sim_s2),"released",G_CALLBACK(sim_s2_released_cb),NULL);
gtk_grid_attach(GTK_GRID(toolbar),sim_s2,8,0,4,1);
sim_s3=gtk_button_new_with_label("Mode");
- //gtk_widget_override_font(sim_s3, pango_font_description_from_string("Arial 16"));
+ //gtk_widget_override_font(sim_s3, pango_font_description_from_string("Sans 11"));
g_signal_connect(G_OBJECT(sim_s3),"pressed",G_CALLBACK(sim_s3_pressed_cb),NULL);
g_signal_connect(G_OBJECT(sim_s3),"released",G_CALLBACK(sim_s3_released_cb),NULL);
gtk_grid_attach(GTK_GRID(toolbar),sim_s3,12,0,4,1);
sim_s4=gtk_button_new_with_label("Filter");
- //gtk_widget_override_font(sim_s4, pango_font_description_from_string("Arial 16"));
+ //gtk_widget_override_font(sim_s4, pango_font_description_from_string("Sans 11"));
g_signal_connect(G_OBJECT(sim_s4),"pressed",G_CALLBACK(sim_s4_pressed_cb),NULL);
g_signal_connect(G_OBJECT(sim_s4),"released",G_CALLBACK(sim_s4_released_cb),NULL);
gtk_grid_attach(GTK_GRID(toolbar),sim_s4,16,0,4,1);
sim_s5=gtk_button_new_with_label("Noise");
- //gtk_widget_override_font(sim_s5, pango_font_description_from_string("Arial 16"));
+ //gtk_widget_override_font(sim_s5, pango_font_description_from_string("Sans 11"));
g_signal_connect(G_OBJECT(sim_s5),"pressed",G_CALLBACK(sim_s5_pressed_cb),NULL);
g_signal_connect(G_OBJECT(sim_s5),"released",G_CALLBACK(sim_s5_released_cb),NULL);
gtk_grid_attach(GTK_GRID(toolbar),sim_s5,20,0,4,1);
sim_s6=gtk_button_new_with_label("AGC");
- //gtk_widget_override_font(sim_s6, pango_font_description_from_string("Arial 16"));
+ //gtk_widget_override_font(sim_s6, pango_font_description_from_string("Sans 11"));
g_signal_connect(G_OBJECT(sim_s6),"pressed",G_CALLBACK(sim_s6_pressed_cb),NULL);
g_signal_connect(G_OBJECT(sim_s6),"released",G_CALLBACK(sim_s6_released_cb),NULL);
gtk_grid_attach(GTK_GRID(toolbar),sim_s6,24,0,4,1);
sim_function=gtk_button_new_with_label("Function");
- //gtk_widget_override_font(sim_function, pango_font_description_from_string("Arial 16"));
+ //gtk_widget_override_font(sim_function, pango_font_description_from_string("Sans 11"));
g_signal_connect(G_OBJECT(sim_function),"clicked",G_CALLBACK(sim_function_cb),NULL);
gtk_grid_attach(GTK_GRID(toolbar),sim_function,28,0,4,1);