use alternating 0 and 1 for dummy data

This commit is contained in:
Robin Müller 2022-11-02 20:02:00 +01:00
parent 622b2e4f21
commit 88302ef7eb
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -53,7 +53,11 @@ def pack_test_command(p: ServiceProviderParams):
if data_size < 0 or data_size > 1024: if data_size < 0 or data_size > 1024:
print("Invalid data size") print("Invalid data size")
break break
dummy_data = bytes(data_size) dummy_data = bytearray()
next_byte = True
for i in range(data_size):
dummy_data.append(int(next_byte))
next_byte = not next_byte
q.add_pus_tc( q.add_pus_tc(
PusTelecommand( PusTelecommand(
service=PusServices.S17_TEST, subservice=130, app_data=dummy_data service=PusServices.S17_TEST, subservice=130, app_data=dummy_data