summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-09-05 10:07:24 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-09-05 10:07:24 -0400
commit375335aaefeca5f7bd05d091c636e65ef89d46bf (patch)
tree69aac83e834f3974830c1e0a31948d0ddac29c6c
parente6a964f0f88b90cdb559e2ae5ce2e73e31381f99 (diff)
added timer loop to check buttons
-rw-r--r--instr-daemon.c6
-rw-r--r--menus.c2
-rw-r--r--menus.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index 24315f7..cb9f9b4 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -282,7 +282,11 @@ int main(int argc, char **argv)
g_signal_connect (service, "run", G_CALLBACK (handler), NULL);
g_signal_connect (service, "incoming", G_CALLBACK(incomingConnection), NULL);
- g_main_loop_run (g_main_loop_new (NULL, FALSE));
+ GMainLoop *loop = g_main_loop_new (NULL, FALSE);
+
+ g_timeout_add (20, Menu_Check_Buttons, NULL);
+
+ g_main_loop_run (loop);
bus_shutdown();
free(stdinQueue);
diff --git a/menus.c b/menus.c
index f7e13ad..8cca8a4 100644
--- a/menus.c
+++ b/menus.c
@@ -2886,7 +2886,7 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower
}
-gboolean Menu_Check_Buttons(void)
+GSourceFunc Menu_Check_Buttons(void)
{
int error_num;
int button_port_val;
diff --git a/menus.h b/menus.h
index 9a5d514..2f95240 100644
--- a/menus.h
+++ b/menus.h
@@ -3,4 +3,4 @@
void Menu_Refresh();
void Menu_Update_Display(void);
void Menu_Clear_Buttons(void);
-gboolean Menu_Check_Buttons(void);
+GSourceFunc Menu_Check_Buttons(void);