File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Oscilloscopes/PerformanceScopes/src/CurvestreamExample
CurvestreamExample-IVI-VISA.NET/CurvestreamExample-IVI-VISA.NET
CurvestreamExample-NI-VISA/CurvestreamExample Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ private void cmdStartTest_Click(object sender, EventArgs e)
242
242
}
243
243
244
244
// Calculate the xvalue for the first point in the record
245
- xvalue = ( float ) - pt_off * xinc + xzero ;
245
+ xvalue = ( ( ( float ) ( - pt_off ) ) * xinc ) + xzero ;
246
246
247
247
// Get the number of bytes that make up the data length string
248
248
NumBytesCharCount = Int32 . Parse ( BlockHeader . TrimStart ( '#' ) , System . Globalization . NumberStyles . HexNumber ) ;
@@ -272,7 +272,7 @@ private void cmdStartTest_Click(object sender, EventArgs e)
272
272
// Convert byte values to floating point values then write to .csv file
273
273
foreach ( byte DataPoint in DataBuffer )
274
274
{
275
- yvalue = ( float ) ( Convert . ToSingle ( ( sbyte ) DataPoint ) - yoff ) * ymult + yzero ;
275
+ yvalue = ( ( Convert . ToSingle ( ( sbyte ) DataPoint ) - yoff ) * ymult ) + yzero ;
276
276
if ( saveToDisk )
277
277
SaveFile . WriteLine ( xvalue . ToString ( ) + "," + yvalue . ToString ( ) ) ;
278
278
// Note: Converting to .CSV is very time consuming operation.
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ private void cmdStartTest_Click(object sender, EventArgs e)
229
229
StreamWriter SaveFile = new StreamWriter ( FileName , false , Encoding . ASCII , BUFFER_SIZE * 10 ) ;
230
230
231
231
// Calculate the xvalue for the first point in the record
232
- xvalue = ( float ) - pt_off * xinc + xzero ;
232
+ xvalue = ( ( ( float ) ( - pt_off ) ) * xinc ) + xzero ;
233
233
234
234
// Get the number of bytes that make up the data length string
235
235
NumBytesCharCount = Int32 . Parse ( BlockHeader . TrimStart ( '#' ) , System . Globalization . NumberStyles . HexNumber ) ;
@@ -258,7 +258,7 @@ private void cmdStartTest_Click(object sender, EventArgs e)
258
258
// Convert byte values to floating point values then write to .csv file
259
259
foreach ( byte DataPoint in DataBuffer )
260
260
{
261
- yvalue = ( float ) ( Convert . ToSingle ( ( sbyte ) DataPoint ) - yoff ) * ymult + yzero ;
261
+ yvalue = ( ( Convert . ToSingle ( ( sbyte ) DataPoint ) - yoff ) * ymult ) + yzero ;
262
262
SaveFile . WriteLine ( xvalue . ToString ( ) + "," + yvalue . ToString ( ) ) ;
263
263
// Note: Converting to .CSV is very time consuming operation.
264
264
// Save in a binary format to maximize speed. Highly recommended for waveforms >= 1 Million points.
You can’t perform that action at this time.
0 commit comments