]> sigrok.org Git - libsigrok.git/commitdiff
hantek-6xxx: store the amount samples received
authorBenjamin Larsson <redacted>
Mon, 4 Apr 2016 17:57:50 +0000 (19:57 +0200)
committerUwe Hermann <redacted>
Sat, 23 Apr 2016 15:37:45 +0000 (17:37 +0200)
src/hardware/hantek-6xxx/api.c

index c176727b8b43bf77c9028e9fc17f408df943317a..461c08a5d900a5c45591a4b05881f474a92bbbd2 100644 (file)
@@ -653,7 +653,7 @@ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer)
        }
 
        devc->sample_buf[devc->sample_buf_write++] = transfer;
-       devc->samp_received = transfer->actual_length / NUM_CHANNELS;
+       devc->samp_received += transfer->actual_length / NUM_CHANNELS;
 
        sr_spew("receive_transfer(): calculated samplerate == %" PRIu64 "ks/s",
                (uint64_t)(transfer->actual_length * 1000 /