]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
This now also recognized HAMlab SDR applications
authorc vw <dl1ycf@darc.de>
Mon, 16 Jul 2018 15:48:00 +0000 (17:48 +0200)
committerc vw <dl1ycf@darc.de>
Mon, 16 Jul 2018 15:48:00 +0000 (17:48 +0200)
discovered.h
discovery.c
stemlab_discovery.c

index cc0ac108fe4616281b50bc0ffab3f2296508b632..1458e2cfac0b5036031a34de617409369e7129f2 100644 (file)
@@ -77,6 +77,7 @@
 #define STEMLAB_PAVEL_RX 1
 #define STEMLAB_PAVEL_TRX 2
 #define STEMLAB_RP_TRX 4
+#define HAMLAB_RP_TRX 8
 #endif
 
 
index a66cc4a397e561f80c1120d8b71560c67ace1b27..f34ea51852bbfa034c9c93f644f79c1b571847b1 100644 (file)
@@ -295,10 +295,16 @@ fprintf(stderr,"%p Protocol=%d name=%s\n",d,d->protocol,d->name);
           }
           if ((d->software_version & STEMLAB_RP_TRX) != 0) {
             gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(apps_combobox[i]),
-                "stemlab_sdr_transceiver_hpsdr", "RedPitaya-Trx");
+                "stemlab_sdr_transceiver_hpsdr", "STEMlab-Trx");
             gtk_combo_box_set_active_id(GTK_COMBO_BOX(apps_combobox[i]),
                 "stemlab_sdr_transceiver_hpsdr");
           }
+          if ((d->software_version & HAMLAB_RP_TRX) != 0) {
+            gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(apps_combobox[i]),
+                "hamlab_sdr_transceiver_hpsdr", "HAMlab-Trx");
+            gtk_combo_box_set_active_id(GTK_COMBO_BOX(apps_combobox[i]),
+                "hamlab_sdr_transceiver_hpsdr");
+          }
           gtk_widget_show(apps_combobox[i]);
           gtk_grid_attach(GTK_GRID(grid), apps_combobox[i], 4, i, 1, 1);
         }
index e3ceb7d5841c6436f0d8f941be8dd56622269c74..8d0d8456756926295a2838f80309e1576f3d8dae 100644 (file)
@@ -268,6 +268,10 @@ static size_t app_list_cb(void *buffer, size_t size, size_t nmemb, void *data) {
   if (g_strstr_len(buffer, size*nmemb, rp_trx_json) != NULL) {
     *software_version |= STEMLAB_RP_TRX;
   }
+  const gchar *hamlab_trx_json = "\"hamlab_sdr_transceiver_hpsdr\":";
+  if (g_strstr_len(buffer, size*nmemb, hamlab_trx_json) != NULL) {
+    *software_version |= HAMLAB_RP_TRX;
+  }
   // Returning the total amount of bytes "processed" to signal cURL that we
   // are done without any errors
   return size * nmemb;