summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 21:16:40 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 21:16:40 -0500
commit0d574a512ef3fe4f0751d0f3c495e347975765cf (patch)
tree2d04db9ee35c0a29f072a476959ada4ce6dc4c30
parent8e4c0d86c8df94d629413cd7863dc3a83cc21959 (diff)
enable broadcast alarms
-rw-r--r--error_utils.c8
-rw-r--r--response.c3
2 files changed, 7 insertions, 4 deletions
diff --git a/error_utils.c b/error_utils.c
index a92c8dd..d4c48a3 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -143,8 +143,9 @@ void queue_error_and_display_on_LCD(int error_num)
g_free (response);
}
+extern void send_message(gchar* message);
-void queue_and_broadcast_sensor_alarm(int error_num) // FIXME - implement
+void queue_and_broadcast_sensor_alarm(int error_num)
{
if (error_num == OK) {
return;
@@ -153,6 +154,11 @@ void queue_and_broadcast_sensor_alarm(int error_num) // FIXME - implement
gchar* response = NULL;
queue_error_and_get_text(&response, error_num);
LCD_display_extended_message (response, TRUE, TRUE);
+
+ gchar *broadcast_str = g_strdup_printf ("%s\r\n> ", response);
+ send_message(broadcast_str);
+ g_free (broadcast_str);
+
g_free (response);
}
diff --git a/response.c b/response.c
index f92a101..7015dba 100644
--- a/response.c
+++ b/response.c
@@ -27,13 +27,10 @@ gboolean cbClientOutput(gpointer data, gpointer additional)
}
gpointer elem;
- g_print_debug("Try pop\n");
//try to pop an element from the queue
elem=g_async_queue_try_pop(queue);
- g_print_debug("after pop\n");
if(elem) {
char* buf = (char*)elem;
- g_print_debug("Extracted %s\n", buf);
gssize size = strlen(buf);
gssize written = 0;