]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
small corrections
authorc vw <dl1ycf@darc.de>
Wed, 7 Aug 2019 08:52:14 +0000 (10:52 +0200)
committerc vw <dl1ycf@darc.de>
Wed, 7 Aug 2019 08:52:14 +0000 (10:52 +0200)
hpsdrsim.c
old_protocol.c
sliders.c

index 90fb695a50536707aa8ddce9a006adffdefcb081..1974186f2ff57cd2eceeabd3368282066189e0bd 100644 (file)
@@ -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");
index d3598443b42cf96f5edf0b9b5e3c980940a2a641..58fc8f433773ac4fe9131f4a6ca274ac40bcfb0e 100644 (file)
@@ -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.
index df7c384de1989b19edd218be65ab2288fb37458d..f95fdee8f7aa25f1e2421981f3d1823aa276ca43 100644 (file)
--- a/sliders.c
+++ b/sliders.c
 *
 */
 
+//
+// 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 <gtk/gtk.h>
 #include <semaphore.h>
 #include <stdio.h>
@@ -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);