mirror of
https://github.com/nasa/trick.git
synced 2025-04-12 21:53:03 +00:00
Data products not plotting the last recorded data point #162
porting fix from 16 back to 15.
This commit is contained in:
parent
4de4bf0692
commit
11f4b5282e
@ -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.
|
||||
//------------------------------------------------------------------
|
||||
|
@ -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 ) {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user