Data products not plotting the last recorded data point #162

porting fix from 16 back to 15.
This commit is contained in:
Alex Lin 2016-08-03 17:08:15 -05:00
parent 4de4bf0692
commit 11f4b5282e
4 changed files with 15 additions and 9 deletions

View File

@ -216,6 +216,11 @@ CurveViewNode::CurveViewNode( Widget Toplevel,
}
}
// Save the final point from getXY
fermi_curve->points[ fermi_curve->nPoints ].x = (x * x_scale_val) + x_bias_val;
fermi_curve->points[ fermi_curve->nPoints ].y = (y * y_scale_val) + y_bias_val;
fermi_curve->nPoints ++;
//------------------------------------------------------------------
// Set the XYCurve's remaining elements.
//------------------------------------------------------------------

View File

@ -145,6 +145,9 @@ GPViewCurveNode::GPViewCurveNode( Widget Toplevel,
( x*atof(curve_x_scale_factor.c_str()) + atof(curve_x_bias.c_str()) ),
( y*atof(curve_y_scale_factor.c_str()) + atof(curve_y_bias.c_str()) ) );
}
fprintf( curve_data_fp,"%e\t%e\n",
( x*atof(curve_x_scale_factor.c_str()) + atof(curve_x_bias.c_str()) ),
( y*atof(curve_y_scale_factor.c_str()) + atof(curve_y_bias.c_str()) ) );
fclose(curve_data_fp);
if ( Curve_number == 0 ) {

View File

@ -108,14 +108,12 @@ DPC_UnitConvDataStream::~DPC_UnitConvDataStream() {
// MEMBER FUNCTION
int DPC_UnitConvDataStream::get(double* timestamp, double* paramValue) {
double time, value;
int ret ;
if ( source_ds->get(&time, &value) ) {
*timestamp = time;
*paramValue = cf->eval(value);
return (1);
} else {
return (0);
}
ret = source_ds->get(&time, &value) ;
*timestamp = time;
*paramValue = cf->eval(value);
return ret ;
}
// MEMBER FUNCTION

View File

@ -259,9 +259,9 @@ int DPC_std_curve::getXY(double *X_value, double *Y_value) {
}
} else {
eos = !ds[0]->get( &t1, &v1);
*X_value = time_conversion->eval( t1);
*Y_value = v1;
if (!eos) {
*X_value = time_conversion->eval( t1);
*Y_value = v1;
return(1);
}
}