summaryrefslogtreecommitdiff
path: root/instr-daemon.c
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2012-09-28 14:45:34 +0900
committerdaniel <danieruru@gmail.com>2012-09-28 14:45:34 +0900
commit131d5ec32ca62c06f1eed9ee282bb15f814f4ba8 (patch)
treec5aa8015fd026708bcaaa5a14a63fa1de1303af0 /instr-daemon.c
parent923c8ce77ea407f3b50999447bc1d774f6a7d5e0 (diff)
parentbc066aa6f5b6c69a29109a2405e8a91c55d2fade (diff)
Merge branch 'master' of grenfell.avtechpulse.com:Instrument
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index 7ee36d3..8ffd2b7 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -8,6 +8,9 @@
#include "nicutils.h"
#include "monitor.h"
#include "menus.h"
+#include "gpib.h"
+#include "parser.h"
+
#include <stdlib.h>
#include <ctype.h>
#include <glib.h>
@@ -193,6 +196,8 @@ int main(int argc, char **argv)
g_type_init ();
+ bus_init();
+
LCD_initialize();
LCD_write(0,0,"Starting...");
@@ -223,7 +228,7 @@ int main(int argc, char **argv)
LCD_write(2,0,message);
g_free (message);
- // FIXME - init RS232
+// GPIB_initialize();
IO_Setup_RS232( globals.Flash.baud,
globals.Flash.parity,
@@ -245,8 +250,6 @@ int main(int argc, char **argv)
}
LCD_write(3,27,"OK");
- bus_init();
-
I2C_Setup_Monitor();
Main_Rst();
@@ -319,5 +322,19 @@ static gboolean periodic_poll (void)
Menu_Check_Buttons ();
+ // FIXME - gpib input - should have it's own thread?
+ //
+ // FIXME - comment out everything up to "return TRUE" if this section
+ // is crashing due to non-functional bus
+ GPIB_check_for_device_clear_signal();
+ if (GPIB_check_for_messages(globals.Registers.gpib_buffer)) {
+ if (GPIB_handle_new_input(globals.Registers.gpib_buffer)) {
+ // FIXME check_for_ctrl_mode_changes(); /* update rem/loc settings */
+ Parser_main(globals.Registers.gpib_buffer, 0, NULL, NULL);
+ }
+ }
+ GPIB_check_for_device_clear_signal();
+
+
return TRUE;
}