From 4e77d77e5dd1ea4268100bf870c58e45a86cb9ce Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Mon, 28 Jan 2013 10:35:25 -0500 Subject: make vxi feature optional, enable with "diag:eprom:char 225 1" --- flash.c | 2 +- globals.h | 2 +- instr-daemon.c | 8 +++++--- libvxi11client/perlbits/VXI11-Client.t | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/flash.c b/flash.c index bdb8fb2..db5a870 100644 --- a/flash.c +++ b/flash.c @@ -391,7 +391,7 @@ static void initFlashValues(FlashStruct *mem) mem->ChanKey_Burst_Count=0; mem->ChanKey_Burst_Time=0; - mem->network_enabled=0; + mem->vxi_enabled=0; mem->self_cal=0; mem->self_cal_interval=5; mem->self_cal_startups=0; diff --git a/globals.h b/globals.h index 805e7aa..6840edb 100644 --- a/globals.h +++ b/globals.h @@ -435,7 +435,7 @@ typedef struct { char ChanKey_Burst_Time; /* 224 */ - char network_enabled; /* 225 */ + char vxi_enabled; /* 225 */ short web_session_timeout; /* 226 - timeout in seconds */ diff --git a/instr-daemon.c b/instr-daemon.c index e1d5c8e..e110863 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -294,9 +294,11 @@ int main(int argc, char **argv) g_timeout_add (20, (GSourceFunc) periodic_poll, NULL); g_timeout_add (100, (GSourceFunc) finish_boot, NULL); - GThread *vxithread =g_thread_create(vxithreadfunc, NULL,false, NULL); - if(vxithread == NULL) - printf("Couldn't create vxi thread\n"); + if (globals.Flash.vxi_enabled) { + GThread *vxithread =g_thread_create(vxithreadfunc, NULL,false, NULL); + if(vxithread == NULL) + printf("Couldn't create vxi thread\n"); + } g_main_loop_run (loop); diff --git a/libvxi11client/perlbits/VXI11-Client.t b/libvxi11client/perlbits/VXI11-Client.t index 96d030b..695540e 100644 --- a/libvxi11client/perlbits/VXI11-Client.t +++ b/libvxi11client/perlbits/VXI11-Client.t @@ -18,7 +18,7 @@ BEGIN { use_ok('VXI11::Client') }; &VXI11::Client::vxi_startinterruptserver(); -my $address = "roi"; +my $address = "192.168.0.62"; my $instr = &VXI11::Client::vxi_open($address, 0); is($instr->vxi_lock(0), 1, "Lock"); -- cgit