Skip to content

Commit

Permalink
SiglentBINImportFilter: round timescale
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemro committed Aug 11, 2023
1 parent 4b27c39 commit d428acb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scopeprotocols/SiglentBINImportFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void SiglentBINImportFilter::OnFileNameChanged()
string name = string("C") + to_string(i+1);
AddStream(Unit(Unit::UNIT_VOLTS), name, Stream::STREAM_TYPE_ANALOG);
auto wfm = new UniformAnalogWaveform;
wfm->m_timescale = FS_PER_SECOND / wh.s_rate;
wfm->m_timescale = round(FS_PER_SECOND / wh.s_rate);
wfm->m_startTimestamp = timestamp * FS_PER_SECOND;
wfm->m_startFemtoseconds = fs;
wfm->m_triggerPhase = 0;
Expand Down Expand Up @@ -204,7 +204,7 @@ void SiglentBINImportFilter::OnFileNameChanged()
string name = string("F") + to_string(i+1);
AddStream(Unit(Unit::UNIT_VOLTS), name, Stream::STREAM_TYPE_ANALOG);
auto wfm = new UniformAnalogWaveform;
wfm->m_timescale = wh.math_s_interval[i] * FS_PER_SECOND;
wfm->m_timescale = round(wh.math_s_interval[i] * FS_PER_SECOND);
wfm->m_startTimestamp = timestamp * FS_PER_SECOND;
wfm->m_startFemtoseconds = fs;
wfm->m_triggerPhase = 0;
Expand Down Expand Up @@ -253,7 +253,7 @@ void SiglentBINImportFilter::OnFileNameChanged()
string name = string("D") + to_string(i);
AddStream(Unit(Unit::UNIT_VOLTS), name, Stream::STREAM_TYPE_DIGITAL);
auto wfm = new UniformDigitalWaveform;
wfm->m_timescale = FS_PER_SECOND / wh.d_s_rate;
wfm->m_timescale = round(FS_PER_SECOND / wh.d_s_rate);
wfm->m_startTimestamp = timestamp * FS_PER_SECOND;
wfm->m_startFemtoseconds = fs;
wfm->m_triggerPhase = 0;
Expand Down

0 comments on commit d428acb

Please sign in to comment.