summaryrefslogtreecommitdiff
path: root/instr-daemon.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-09-06 13:06:35 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-09-06 13:06:35 -0400
commit61990ae8b79aca30745eca02b44e63c377504176 (patch)
tree6a7665f4aaf6402462bddacf45c4c14171de35e6 /instr-daemon.c
parent6e01ae99f1b7b61e6057454891d9bbd11db2196f (diff)
add a periodic_poll function to check buttons (and gpib in future)
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index b90990d..d9a99c3 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -14,6 +14,10 @@
#define STDIN_BUF_SIZE 1024
+
+static gboolean periodic_poll (void);
+
+
int port=3333; //port to listen
int connections=0;
int maxConn=16; //max connections - 16
@@ -284,7 +288,7 @@ int main(int argc, char **argv)
GMainLoop *loop = g_main_loop_new (NULL, FALSE);
- g_timeout_add (20, Menu_Check_Buttons, NULL);
+ g_timeout_add (20, (GSourceFunc) periodic_poll, NULL);
g_main_loop_run (loop);
@@ -295,3 +299,12 @@ int main(int argc, char **argv)
return 0;
}
+
+
+static gboolean periodic_poll (void)
+{
+
+ Menu_Check_Buttons ();
+
+ return TRUE;
+}