]> sigrok.org Git - libsigrok.git/commitdiff
Sigma: Download samples from partial chunks.
authorHåvard Espeland <redacted>
Sat, 15 Jan 2011 18:19:49 +0000 (19:19 +0100)
committerHåvard Espeland <redacted>
Sat, 15 Jan 2011 18:20:31 +0000 (19:20 +0100)
hardware/asix-sigma/asix-sigma.c

index 583501c02ba70033a12792cd01185e13ec291722..af8e6d27664d6c21a9fd13010b958a744389a35d 100644 (file)
@@ -938,7 +938,7 @@ static int receive_data(int fd, int revents, void *user_data)
        fd = fd;
        revents = revents;
 
-       numchunks = sigma->state.stoppos / 512;
+       numchunks = (sigma->state.stoppos + 511) / 512;
 
        if (sigma->state.state == SIGMA_IDLE)
                return FALSE;