mirror of
https://github.com/nasa/trick.git
synced 2025-01-29 15:43:57 +00:00
Data products not plotting the last recorded data point #162
When reading a data stream to plot the end of stream flag is being set as the last point is read. This was causing several layers of calls not to save the last point. I went ahead and saved the result of the get_next_point calls whether the end of stream flag is set or not and now we don't lose the last point.
This commit is contained in:
parent
a32e1d7557
commit
3d604ff770
@ -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.
|
||||
//------------------------------------------------------------------
|
||||
|
@ -102,14 +102,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 = cv_convert_double(cf, value) ;;
|
||||
return (1);
|
||||
} else {
|
||||
return (0);
|
||||
}
|
||||
ret = source_ds->get(&time, &value) ;
|
||||
*timestamp = time;
|
||||
*paramValue = cv_convert_double(cf, value) ;;
|
||||
return ret ;
|
||||
}
|
||||
|
||||
// MEMBER FUNCTION
|
||||
|
@ -253,9 +253,9 @@ int DPC_std_curve::getXY(double *X_value, double *Y_value) {
|
||||
}
|
||||
} else {
|
||||
eos = !ds[0]->get( &t1, &v1);
|
||||
*X_value = cv_convert_double(time_conversion,t1);
|
||||
*Y_value = v1;
|
||||
if (!eos) {
|
||||
*X_value = cv_convert_double(time_conversion,t1);
|
||||
*Y_value = v1;
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user