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

Task #10073: changed dumping procedure in TBBDriver

parent 091e58bd
No related branches found
No related tags found
No related merge requests found
......@@ -220,16 +220,14 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
double sampletime = 1. / (itsLastSavedSampleFreq * 1E6); // in sec
// calculate time of last sample in memory
NsTimestamp
lastSampleTime(itsLastSavedSecond + ((itsLastSavedSampleNr + itsLastSavedNrOfSamples) * sampletime));
NsTimestamp lastSampleTime(itsLastSavedSecond + ((itsLastSavedSampleNr + itsLastSavedNrOfSamples) * sampletime));
// calculate time of first sample in memory
NsTimestamp
firstSampleTime((double)lastSampleTime - (TS->getChPageSize(getChannelNr()) * itsLastSavedNrOfSamples * sampletime));
NsTimestamp firstSampleTime((double)lastSampleTime - (TS->getChPageSize(getChannelNr()) * itsLastSavedNrOfSamples * sampletime));
// calculate start and stop time
NsTimestamp startTimestamp = itsTimestamp - itsTimeBefore;
NsTimestamp stopTimestamp = itsTimestamp + itsTimeAfter;
NsTimestamp startTimestamp(itsTimestamp - itsTimeBefore);
NsTimestamp stopTimestamp(itsTimestamp + itsTimeAfter);
#if 1
//LOG_DEBUG_STR(formatString("Timestamp = %lu seconds %lu nseconds", itsTimestamp.sec(), itsTimestamp.nsec()));
......@@ -267,8 +265,8 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
setDone(true);
}
itsTimeBefore = itsTimestamp - startTimestamp;
itsTimeAfter = stopTimestamp - itsTimestamp;
itsTimeBefore.set(itsTimestamp - startTimestamp);
itsTimeAfter.set(stopTimestamp - itsTimestamp);
// convert it to board units
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment