Skip to content

Commit d428acb

Browse files
committed
SiglentBINImportFilter: round timescale
1 parent 4b27c39 commit d428acb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scopeprotocols/SiglentBINImportFilter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void SiglentBINImportFilter::OnFileNameChanged()
157157
string name = string("C") + to_string(i+1);
158158
AddStream(Unit(Unit::UNIT_VOLTS), name, Stream::STREAM_TYPE_ANALOG);
159159
auto wfm = new UniformAnalogWaveform;
160-
wfm->m_timescale = FS_PER_SECOND / wh.s_rate;
160+
wfm->m_timescale = round(FS_PER_SECOND / wh.s_rate);
161161
wfm->m_startTimestamp = timestamp * FS_PER_SECOND;
162162
wfm->m_startFemtoseconds = fs;
163163
wfm->m_triggerPhase = 0;
@@ -204,7 +204,7 @@ void SiglentBINImportFilter::OnFileNameChanged()
204204
string name = string("F") + to_string(i+1);
205205
AddStream(Unit(Unit::UNIT_VOLTS), name, Stream::STREAM_TYPE_ANALOG);
206206
auto wfm = new UniformAnalogWaveform;
207-
wfm->m_timescale = wh.math_s_interval[i] * FS_PER_SECOND;
207+
wfm->m_timescale = round(wh.math_s_interval[i] * FS_PER_SECOND);
208208
wfm->m_startTimestamp = timestamp * FS_PER_SECOND;
209209
wfm->m_startFemtoseconds = fs;
210210
wfm->m_triggerPhase = 0;
@@ -253,7 +253,7 @@ void SiglentBINImportFilter::OnFileNameChanged()
253253
string name = string("D") + to_string(i);
254254
AddStream(Unit(Unit::UNIT_VOLTS), name, Stream::STREAM_TYPE_DIGITAL);
255255
auto wfm = new UniformDigitalWaveform;
256-
wfm->m_timescale = FS_PER_SECOND / wh.d_s_rate;
256+
wfm->m_timescale = round(FS_PER_SECOND / wh.d_s_rate);
257257
wfm->m_startTimestamp = timestamp * FS_PER_SECOND;
258258
wfm->m_startFemtoseconds = fs;
259259
wfm->m_triggerPhase = 0;

0 commit comments

Comments
 (0)