From 663e2f7a3d1ae0a40f45e760c3ae6998d79c1a2f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 14 Jul 2012 19:50:23 -0500 Subject: Fix scope --- servers/gpib_server_lin/src/scope_functions.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'servers/gpib_server_lin/src/scope_functions.cpp') diff --git a/servers/gpib_server_lin/src/scope_functions.cpp b/servers/gpib_server_lin/src/scope_functions.cpp index b0571d6..deda671 100644 --- a/servers/gpib_server_lin/src/scope_functions.cpp +++ b/servers/gpib_server_lin/src/scope_functions.cpp @@ -662,7 +662,7 @@ printf("[PROFILE] %f s\n\r", ((tp3.tv_nsec+(tp3.tv_sec*1e9))-(tp2.tv_nsec+(tp2.t clock_gettime(CLOCK_REALTIME, &tp4); printf("[PROFILE] %f s\n\r", ((tp4.tv_nsec+(tp4.tv_sec*1e9))-(tp3.tv_nsec+(tp3.tv_sec*1e9)))/1e9); #endif - TQString preamble(segarray); + TQString preamble(segarray); // RAJA UNCOMMENT ME TQStringList resultPairs = TQStringList::split(";", preamble, FALSE); // Find/initialize critical data values double ymult; @@ -673,13 +673,15 @@ printf("[PROFILE] %f s\n\r", ((tp4.tv_nsec+(tp4.tv_sec*1e9))-(tp3.tv_nsec+(tp3.t double xposition; const char* xunits; - ymult = resultPairs[13].toDouble(); - yoffset = resultPairs[14].toDouble()*ymult; - yposition = resultPairs[15].toDouble()*ymult; - yunits = strdup(resultPairs[12]); - xincr = resultPairs[9].toDouble(); - xposition = resultPairs[10].toDouble(); - xunits = strdup(resultPairs[8]); + if (resultPairs.count() > 15) { + ymult = resultPairs[13].toDouble(); + yoffset = resultPairs[14].toDouble()*ymult; + yposition = resultPairs[15].toDouble()*ymult; + yunits = strdup(resultPairs[12]); + xincr = resultPairs[9].toDouble(); + xposition = resultPairs[10].toDouble(); + xunits = strdup(resultPairs[8]); + } // Get the curve data now sprintf(falpha,"CURVE?"); -- cgit v1.2.3