File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 12
12
def main (argv ):
13
13
parser = argparse .ArgumentParser (
14
14
formatter_class = argparse .ArgumentDefaultsHelpFormatter )
15
+ parser .add_argument ("--lead-in" , type = float , default = 0.5 ,
16
+ help = "lead-in, seconds" )
15
17
parser .add_argument ("--window" , type = float , default = 5.5 ,
16
18
help = "data window, seconds" )
17
19
parser .add_argument ("--total" , type = float , default = 8.0 ,
@@ -22,10 +24,10 @@ def main(argv):
22
24
bit_ms = 0.004916
23
25
total_bytes = int (args .total * 1000.0 / bit_ms / 8 )
24
26
window_bytes = int (args .window * 1000.0 / bit_ms / 8 )
25
- init_bytes = int (500 .0 / bit_ms / 8 )
27
+ init_bytes = int (args . lead_in * 1000 .0 / bit_ms / 8 )
26
28
27
29
assert (2 * init_bytes + window_bytes ) < total_bytes , "Window too large"
28
- print ("Lead-In: %.2f sec -> %u bytes" % (0.5 , init_bytes ))
30
+ print ("Lead-In: %.2f sec -> %u bytes" % (args . lead_in , init_bytes ))
29
31
print ("Window: %.2f sec -> %u bytes" % (args .window , window_bytes ))
30
32
print ("TOTAL: %.2f sec -> %u bytes" % (args .total , total_bytes ))
31
33
You can’t perform that action at this time.
0 commit comments