Skip to content

Commit 3bc2faf

Browse files
committed
Remove chunks per send when finding the right send chunk
It would make send_chunk bigger than needed, and if the send_chunk is divisible, so is the send_chunk*number_chunks_per_send.
1 parent abe571e commit 3bc2faf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commpy/links.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def link_performance_full_metrics(self, SNRs, tx_max, err_min, send_chunk=None,
210210
code_rate = Fraction(code_rate).limit_denominator(100)
211211
self.rate = code_rate
212212
divider = (Fraction(1, self.num_bits_symbol * self.channel.nb_tx) * 1 / code_rate).denominator
213-
send_chunk = max(divider, (send_chunk * number_chunks_per_send) // divider * divider)
213+
send_chunk = max(divider, send_chunk // divider * divider)
214214

215215
receive_size = self.channel.nb_tx * self.num_bits_symbol
216216
full_args_decoder = len(getfullargspec(self.decoder).args) > 1

0 commit comments

Comments
 (0)