summaryrefslogtreecommitdiffstats
path: root/servers/gpib_server_lin/src/scope_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/gpib_server_lin/src/scope_functions.cpp')
-rw-r--r--servers/gpib_server_lin/src/scope_functions.cpp18
1 files changed, 10 insertions, 8 deletions
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?");