summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2023-10-13 17:33:55 +0200
committerLeah Neukirchen <leah@vuxu.org>2023-10-13 17:33:55 +0200
commit7cbacb585461c8a093f3a6c9e3135dcc1dafc01a (patch)
treefcaf38945295d6afd98911ba0bfb5a169cdee01b
parentc20301e5803d84dd097ab0f5f309889854f4120b (diff)
downloadmico-7cbacb585461c8a093f3a6c9e3135dcc1dafc01a.tar.gz
mico-7cbacb585461c8a093f3a6c9e3135dcc1dafc01a.tar.xz
mico-7cbacb585461c8a093f3a6c9e3135dcc1dafc01a.zip
flush more
-rw-r--r--mico-store.c6
1 files 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;