correct getting frame_id so we get images instead of nodata

This commit is contained in:
Isaac Connor 2019-08-23 17:59:29 -04:00
parent 7598654740
commit e707bd8e72
1 changed files with 5 additions and 2 deletions

View File

@ -154,9 +154,12 @@ function getImageSource(monId, time) {
var duration = Frame.NextTimeStampSecs - Frame.TimeStampSecs; var duration = Frame.NextTimeStampSecs - Frame.TimeStampSecs;
frame_id = Frame.FrameId + parseInt( (NextFrame.FrameId-Frame.FrameId) * ( time-Frame.TimeStampSecs )/duration ); frame_id = Frame.FrameId + parseInt( (NextFrame.FrameId-Frame.FrameId) * ( time-Frame.TimeStampSecs )/duration );
//console.log("Have NextFrame: duration: " + duration + " frame_id = " + frame_id + " from " + NextFrame.FrameId + ' - ' + Frame.FrameId + " time: " + (time-Frame.TimeStampSecs) ); //console.log("Have NextFrame: duration: " + duration + " frame_id = " + frame_id + " from " + NextFrame.FrameId + ' - ' + Frame.FrameId + " time: " + (time-Frame.TimeStampSecs) );
}
} else { } else {
frame_id = Frame['Id']; frame_id = Frame.FrameId;
}
} else {
frame_id = Frame.FrameId;
console.log("No NextFrame"); console.log("No NextFrame");
} }
Event = events[Frame.EventId]; Event = events[Frame.EventId];