From: c vw Date: Wed, 7 Aug 2019 08:52:14 +0000 (+0200) Subject: small corrections X-Git-Url: https://git.rkrishnan.org/%5B/listings/flags/status?a=commitdiff_plain;h=ed64cd1cc5e29c10793a1405f3ce99e932ca50ce;p=pihpsdr.git small corrections --- diff --git a/hpsdrsim.c b/hpsdrsim.c index 90fb695..1974186 100644 --- a/hpsdrsim.c +++ b/hpsdrsim.c @@ -852,7 +852,7 @@ void process_ep2(uint8_t *frame) chk_data((frame[1] & 0x03) >> 0, rate, "SampleRate"); chk_data((frame[1] & 0x0C) >> 3, ref10, "Ref10MHz"); chk_data((frame[1] & 0x10) >> 4, src122, "Source122MHz"); - chk_data((frame[1] & 0x60) >> 5, PMconfig, "Pen/Mer config"); + chk_data((frame[1] & 0x60) >> 5, PMconfig, "Penelope/Mercury config"); chk_data((frame[1] & 0x80) >> 7, MicSrc, "MicSource"); chk_data(frame[2] & 1, TX_class_E, "TX CLASS-E"); diff --git a/old_protocol.c b/old_protocol.c index d359844..58fc8f4 100644 --- a/old_protocol.c +++ b/old_protocol.c @@ -653,6 +653,9 @@ static long long channel_freq(int chan) { v=receiver[1]->id; } break; + case 4: // RX5 associated with TX DAC frequency + v=-1; + break; #else case 0: v=receiver[0]->id; @@ -665,6 +668,9 @@ static long long channel_freq(int chan) { } break; #endif + default: // hook for determining the TX frequency + v=-1; + break; } // // When transmitting with PURESIGNAL, set frequency of PS feedback channel to tx freq @@ -1292,9 +1298,9 @@ void ozy_send_buffer() { if(device==DEVICE_HERMES || device==DEVICE_ANGELIA || device==DEVICE_ORION || device==DEVICE_ORION2 || device == DEVICE_STEMLAB) { - // if attenuation is zero, then disable attenuator - i = adc_attenuation[receiver[0]->adc] & 0x1F; - if (i >0) output_buffer[C4]=0x20| i; + // bit 5 on somee platforms activates a preamp that is hard-wired "on" on + // other platforms, therefore always set it. + output_buffer[C4]=0x20 | (adc_attenuation[receiver[0]->adc] & 0x1F); } else { #ifdef RADIOBERRY int att = 63 - rx_gain_slider[active_receiver->adc]; @@ -1308,9 +1314,9 @@ void ozy_send_buffer() { if(receivers==2) { if(device==DEVICE_HERMES || device==DEVICE_ANGELIA || device==DEVICE_ORION || device==DEVICE_ORION2 || device==DEVICE_STEMLAB) { - // if attenuation is zero, then disable attenuator - i = adc_attenuation[receiver[1]->adc] & 0x1F; - if (i > 0) output_buffer[C1]=0x20|i; + // bit 5 on somee platforms activates a preamp that is hard-wired "on" on + // other platforms, therefore always set it. + output_buffer[C1]=0x20 | (adc_attenuation[receiver[1]->adc] & 0x1F); } } output_buffer[C2]=0x00; // ADC3 attenuator disabled. diff --git a/sliders.c b/sliders.c index df7c384..f95fdee 100644 --- a/sliders.c +++ b/sliders.c @@ -17,6 +17,18 @@ * */ +// +// DL1YCF: +// uncomment the #define line following, then you will get +// a "TX compression" slider with an enabling checkbox +// in the bottom right of the sliders area, instead of the +// sequelch slider and checkbox. +// This option can also be passed to the compiler with "-D" +// and thus be activated through the Makefile. +// +//#define COMPRESSION_SLIDER_INSTEAD_OF_SQUELCH 1 +// + #include #include #include @@ -500,7 +512,7 @@ static void compressor_enable_cb(GtkWidget *widget, gpointer data) { void set_squelch() { setSquelch(active_receiver); -#ifndef COMPRESSION_SLIDER +#ifndef COMPRESSION_SLIDER_INSTEAD_OF_SQUELCH if(display_sliders) { gtk_range_set_value (GTK_RANGE(squelch_scale),active_receiver->squelch); } else { @@ -529,13 +541,13 @@ void set_squelch() { gtk_range_set_value (GTK_RANGE(squelch_scale),active_receiver->squelch); scale_timer=g_timeout_add(2000,scale_timeout_cb,NULL); } -#ifndef COMPRESSION_SLIDER +#ifndef COMPRESSION_SLIDER_INSTEAD_OF_SQUELCH } #endif } void set_compression(TRANSMITTER* tx) { -#ifdef COMPRESSION_SLIDER +#ifdef COMPRESSION_SLIDER_INSTEAD_OF_SQUELCH if(display_sliders) { gtk_range_set_value (GTK_RANGE(comp_scale),tx->compressor_level); } else { @@ -564,7 +576,7 @@ void set_compression(TRANSMITTER* tx) { gtk_range_set_value (GTK_RANGE(comp_scale),tx->compressor_level); scale_timer=g_timeout_add(2000,scale_timeout_cb,NULL); } -#ifdef COMPRESSION_SLIDER +#ifdef COMPRESSION_SLIDER_INSTEAD_OF_SQUELCH } #endif // Now we are also displaying the TX compressor value in the VFO panel @@ -674,7 +686,7 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height); 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 +#ifndef COMPRESSION_SLIDER_INSTEAD_OF_SQUELCH squelch_label=gtk_label_new("Squelch:"); //gtk_widget_override_font(squelch_label, pango_font_description_from_string("Sans 11")); gtk_widget_show(squelch_label); @@ -693,7 +705,7 @@ fprintf(stderr,"sliders_init: width=%d height=%d\n", width,height); 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:"); + comp_label=gtk_label_new("COMP:"); //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);