From: c vw Date: Mon, 16 Jul 2018 15:48:00 +0000 (+0200) Subject: This now also recognized HAMlab SDR applications X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/status?a=commitdiff_plain;h=864239174a4b7f31cd248a337d376f2776dcdf4a;p=pihpsdr.git This now also recognized HAMlab SDR applications --- diff --git a/discovered.h b/discovered.h index cc0ac10..1458e2c 100644 --- a/discovered.h +++ b/discovered.h @@ -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 diff --git a/discovery.c b/discovery.c index a66cc4a..f34ea51 100644 --- a/discovery.c +++ b/discovery.c @@ -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); } diff --git a/stemlab_discovery.c b/stemlab_discovery.c index e3ceb7d..8d0d845 100644 --- a/stemlab_discovery.c +++ b/stemlab_discovery.c @@ -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;