Skip to content
Snippets Groups Projects
Commit 00d57656 authored by Pieter Donker's avatar Pieter Donker
Browse files

Task #10073: changed dumping procedure in TBBDriver

parent adc8ea24
No related branches found
No related tags found
No related merge requests found
......@@ -226,8 +226,8 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
NsTimestamp firstSampleTime((double)lastSampleTime - (TS->getChPageSize(getChannelNr()) * itsLastSavedNrOfSamples * sampletime));
// calculate start and stop time
NsTimestamp startTimestamp(itsTimestamp - itsTimeBefore);
NsTimestamp stopTimestamp(itsTimestamp + itsTimeAfter);
NsTimestamp startTimestamp((double)itsTimestamp - (double)itsTimeBefore);
NsTimestamp stopTimestamp((double)itsTimestamp + (double)itsTimeAfter);
#if 1
//LOG_DEBUG_STR(formatString("Timestamp = %lu seconds %lu nseconds", itsTimestamp.sec(), itsTimestamp.nsec()));
......@@ -238,7 +238,7 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
#endif
// to get last part of recording
if (itsTimestamp == 0.0) {
if ((double)itsTimestamp == 0.0) {
itsTimestamp = lastSampleTime;
}
......@@ -265,15 +265,15 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
setDone(true);
}
itsTimeBefore.set(itsTimestamp - startTimestamp);
itsTimeAfter.set(stopTimestamp - itsTimestamp);
itsTimeBefore.set((double)itsTimestamp - (double)startTimestamp);
itsTimeAfter.set((double)stopTimestamp - (double)itsTimestamp);
// convert it to board units
itsSecondstime = (uint32)itsTimestamp.sec();
itsSampleNr = (uint32)(itsTimestamp.nsec() / (sampletime * 1E9));
itsPrepages = (uint32)ceil(((double)(itsTimestamp - startTimestamp) / sampletime) / itsLastSavedNrOfSamples);
itsPostpages = (uint32)ceil(((double)(stopTimestamp - itsTimestamp) / sampletime) / itsLastSavedNrOfSamples);
itsPrepages = (uint32)ceil((((double)itsTimestamp - (double)startTimestamp) / sampletime) / itsLastSavedNrOfSamples);
itsPostpages = (uint32)ceil((((double)stopTimestamp - (double)itsTimestamp) / sampletime) / itsLastSavedNrOfSamples);
//if (itsPostpages == 0) { itsPostpages = 1; }
LOG_DEBUG_STR(formatString("Read request time=%lu samplenr=%lu prepages=%lu postpages=%lu",
itsSecondstime, itsSampleNr, itsPrepages, itsPostpages));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment