diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-09-05 10:07:24 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-09-05 10:07:24 -0400 |
commit | 375335aaefeca5f7bd05d091c636e65ef89d46bf (patch) | |
tree | 69aac83e834f3974830c1e0a31948d0ddac29c6c | |
parent | e6a964f0f88b90cdb559e2ae5ce2e73e31381f99 (diff) |
added timer loop to check buttons
-rw-r--r-- | instr-daemon.c | 6 | ||||
-rw-r--r-- | menus.c | 2 | ||||
-rw-r--r-- | menus.h | 2 |
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); @@ -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; @@ -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); |