From 7cbacb585461c8a093f3a6c9e3135dcc1dafc01a Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 13 Oct 2023 17:33:55 +0200 Subject: flush more --- mico-store.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mico-store.c b/mico-store.c index b39c258..9cf4aaa 100644 --- a/mico-store.c +++ b/mico-store.c @@ -62,8 +62,7 @@ putbits1_msb(struct bitfile *bf, int count, uint32_t bits) static void putbits1_flush(struct bitfile *bf) { - printf("flush: %d\n", bf->bitcount); - for (int i = bf->bitcount; i >= 0; i--) + for (int i = bf->bitcount + 8; i >= 0; i--) putbits1_msb(bf, 1, 0); fflush(bf->output); } @@ -105,7 +104,6 @@ put1(struct bitfile *bf, int64_t v) putbits1_msb(bf, 32, v & 0xffffffff); } - int main() { @@ -191,7 +189,7 @@ main() } put1(&ts, (t - pt) - (pt - ppt)); - put1(&vs, (int32_t)((v - pv) * 10000)); + put1(&vs, (int64_t)((v - pv) * 10000)); ppt = pt; pt = t; -- cgit 1.4.1