summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--instr-daemon.c15
-rw-r--r--menus.c4
-rw-r--r--menus.h2
3 files changed, 16 insertions, 5 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;
+}
diff --git a/menus.c b/menus.c
index e6d3776..0d9a859 100644
--- a/menus.c
+++ b/menus.c
@@ -2895,7 +2895,7 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower
}
-GSourceFunc Menu_Check_Buttons(void)
+void Menu_Check_Buttons(void)
{
int button_port_val;
int upper_encoder_val;
@@ -2987,8 +2987,6 @@ GSourceFunc Menu_Check_Buttons(void)
Submenu_Service_Encoder(encoder_change);
}
}
-
- return TRUE;
}
diff --git a/menus.h b/menus.h
index 2f95240..efc2233 100644
--- a/menus.h
+++ b/menus.h
@@ -3,4 +3,4 @@
void Menu_Refresh();
void Menu_Update_Display(void);
void Menu_Clear_Buttons(void);
-GSourceFunc Menu_Check_Buttons(void);
+void Menu_Check_Buttons(void);