diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-14 19:50:23 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-14 19:50:23 -0500 |
commit | 663e2f7a3d1ae0a40f45e760c3ae6998d79c1a2f (patch) | |
tree | 88d87fd5190e03dc6237d5ae5ad13df490ee1545 /servers/gpib_server_lin | |
parent | c50fa83bfd137b6b5aa7f9c1e4c310ddde75e585 (diff) | |
download | ulab-663e2f7a3d1ae0a40f45e760c3ae6998d79c1a2f.tar.gz ulab-663e2f7a3d1ae0a40f45e760c3ae6998d79c1a2f.zip |
Fix scope
Diffstat (limited to 'servers/gpib_server_lin')
-rw-r--r-- | servers/gpib_server_lin/src/scope_functions.cpp | 18 |
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?"); |