diff options
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 23 |
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; } |