Skip to content

Commit 4b27c39

Browse files
committed
SiglentBINImportFilter: fix math waveform sample size
1 parent 6022457 commit 4b27c39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scopeprotocols/SiglentBINImportFilter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void SiglentBINImportFilter::OnFileNameChanged()
218218

219219
if(data_width == 2)
220220
{
221-
for(size_t j = 0; j < wh.wave_length; j++)
221+
for(size_t j = 0; j < wh.math_wave_length[i]; j++)
222222
{
223223
const uint16_t* sample = reinterpret_cast<const uint16_t*>(f.c_str() + fpos);
224224
float value = ((static_cast<int32_t>(*sample) - center_code)) * v_gain - wh.math_v_offset[i].value;
@@ -228,7 +228,7 @@ void SiglentBINImportFilter::OnFileNameChanged()
228228
}
229229
else
230230
{
231-
for(size_t j = 0; j < wh.wave_length; j++)
231+
for(size_t j = 0; j < wh.math_wave_length[i]; j++)
232232
{
233233
const uint8_t* sample = reinterpret_cast<const uint8_t*>(f.c_str() + fpos);
234234
float value = (static_cast<int32_t>(*sample) - center_code) * v_gain - wh.math_v_offset[i].value;

0 commit comments

Comments
 (0)