From: DL1YCF <dl1ycf@darc.de>
Date: Sat, 4 Sep 2021 10:15:23 +0000 (+0200)
Subject: Small changes.
X-Git-Url: https://git.rkrishnan.org/pf/content/en/(%5B%5E?a=commitdiff_plain;h=4b3beb56c4d1f6bda11cf5bf11b75d608ecf226b;p=pihpsdr.git

Small changes.
---

diff --git a/Makefile b/Makefile
index 5dc4cfd..3157f98 100644
--- a/Makefile
+++ b/Makefile
@@ -125,6 +125,10 @@ LOCALCW_HEADERS= iambic.h
 LOCALCW_OBJS   = iambic.o
 endif
 
+ifeq ($(UNAME_S), Darwin)
+GPIO_INCLUDE=
+endif
+
 ifeq ($(GPIO_INCLUDE),GPIO)
 GPIO_OPTIONS=-D GPIO
 GPIOD_VERSION=$(shell pkg-config --modversion libgpiod)
diff --git a/midi2.c b/midi2.c
index a5dc7d2..e23a1bb 100644
--- a/midi2.c
+++ b/midi2.c
@@ -57,21 +57,7 @@ void NewMidiEvent(enum MIDIevent event, int channel, int note, int val) {
 	    // Found matching entry
 	    switch (desc->event) {
 		case MIDI_NOTE:
-                    if (desc->type == MIDI_KEY) {
-                      switch (desc->action) {
-                        case CW_LEFT:
-                        case CW_RIGHT:
-                        case CW_KEYER:
-                        case PTT:
-                          // deliver message for note-on and note-off
-                          DoTheMidi(desc->action, desc->type, val);
-                          break;
-                        default:
-                          // deliver only note-on messages
-                          if (val == 1) DoTheMidi(desc->action, desc->type, val);
-                          break;
-                      }
-                    }
+                    DoTheMidi(desc->action, desc->type, val);
                     break;
 		case MIDI_CTRL:
 		    if (desc->type == MIDI_KNOB) {
diff --git a/new_menu.c b/new_menu.c
index 4eebec4..29d8b9f 100644
--- a/new_menu.c
+++ b/new_menu.c
@@ -501,12 +501,12 @@ void new_menu()
     {
       GtkWidget *restart_b=gtk_button_new_with_label("Restart");
       g_signal_connect (restart_b, "button-press-event", G_CALLBACK(restart_cb), NULL);
-      gtk_grid_attach(GTK_GRID(grid),restart_b,2,0,2,1);
+      gtk_grid_attach(GTK_GRID(grid),restart_b,2,0,1,1);
     }
 
     GtkWidget *exit_b=gtk_button_new_with_label("Exit piHPSDR");
     g_signal_connect (exit_b, "button-press-event", G_CALLBACK(exit_cb), NULL);
-    gtk_grid_attach(GTK_GRID(grid),exit_b,4,0,2,1);
+    gtk_grid_attach(GTK_GRID(grid),exit_b,3,0,2,1);
 
     i=5;
 
diff --git a/radio.c b/radio.c
index 0a4b918..d53b766 100644
--- a/radio.c
+++ b/radio.c
@@ -689,7 +689,7 @@ void start_radio() {
   protocol=radio->protocol;
   device=radio->device;
 
-  // init atlas_penelop flag
+  // init atlas_penelope flag
   atlas_penelope = 0;  // default: no penelope
   if (protocol == ORIGINAL_PROTOCOL && device == DEVICE_METIS) {
     //
@@ -1122,6 +1122,12 @@ void start_radio() {
 
   iqswap=0;
 
+//
+// In most cases, ALEX is the best default choice for the filter board.
+// here we set filter_board to a different default value for some
+// "special" hardware. The choice made here only applies if the filter_board
+// is not specified in the props fil
+//
 #ifdef SOAPYSDR
   if(device==SOAPYSDR_USB_DEVICE) {
     iqswap=1;
@@ -1130,6 +1136,15 @@ void start_radio() {
   }
 #endif
 
+  if ((protocol == ORIGINAL_PROTOCOL && device == DEVICE_HERMES_LITE2) ||
+      (protocol == NEW_PROTOCOL && device == NEW_DEVICE_HERMES_LITE2))  {
+    filter_board = N2ADR;
+  }
+
+  if (protocol == ORIGINAL_PROTOCOL && device == DEVICE_STEMLAB) {
+    filter_board = CHARLY25;
+  }
+
   /*
   adc_attenuation[0]=0;
   adc_attenuation[1]=0;