Skip to content

Commit bcc36dd

Browse files
author
Eduardo Soares
committed
Fix bitwise xor when MIMO was used
Some times the result for the decoded message would be in floats instead of ints, causing the bitwise operation to fail.
1 parent c276ede commit bcc36dd

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
@@ -203,7 +203,7 @@ def link_performance(self, SNRs, send_max, err_min, send_chunk=None, code_rate=1
203203
# Deals with MIMO channel
204204
if isinstance(self.channel, MIMOFlatChannel):
205205
nb_symb_vector = len(channel_output)
206-
received_msg = np.empty(int(math.ceil(len(msg) / self.rate)))
206+
received_msg = np.empty(int(math.ceil(len(msg) / self.rate)), dtype=np.int8)
207207
for i in range(nb_symb_vector):
208208
received_msg[receive_size * i:receive_size * (i + 1)] = \
209209
self.receive(channel_output[i], self.channel.channel_gains[i],

0 commit comments

Comments
 (0)