From: John Melton g0orx/n6lyt <john.d.melton@googlemail.com>
Date: Mon, 2 May 2016 09:06:57 +0000 (+0000)
Subject: checks for device status to allow start
X-Git-Url: https://git.rkrishnan.org/vdrive/components/(%5B%5E?a=commitdiff_plain;h=cdcf3c782e94a9c9de0953105e472cbf202a81e3;p=pihpsdr.git

checks for device status to allow start
---

diff --git a/main.c b/main.c
index 3890f2c..b95cca4 100644
--- a/main.c
+++ b/main.c
@@ -802,6 +802,14 @@ gint init(void* arg) {
               gtk_grid_attach(GTK_GRID(grid),start_button,4,i,1,1);
               g_signal_connect(start_button,"pressed",G_CALLBACK(start_cb),(gpointer *)i);
 
+              // if not available then cannot start it
+              if(d->status!=STATE_AVAILABLE) {
+                gtk_button_set_label(GTK_BUTTON(start_button),"In Use");
+                gtk_widget_set_sensitive(start_button, FALSE);
+              }
+
+              // check subnet to see if can access
+
               GtkWidget *configure_button=gtk_button_new_with_label("Configure");
               gtk_widget_override_font(configure_button, pango_font_description_from_string("Arial 18"));
               gtk_widget_show(configure_button);
diff --git a/pihpsdr b/pihpsdr
index f100b70..e2f2874 100755
Binary files a/pihpsdr and b/pihpsdr differ
diff --git a/release/pihpsdr.tar b/release/pihpsdr.tar
index cdb136b..b396a3f 100644
Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ
diff --git a/release/pihpsdr/pihpsdr b/release/pihpsdr/pihpsdr
index f100b70..e2f2874 100755
Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ