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
1 changed files with 5 additions and 1 deletions

View File

@ -53,7 +53,11 @@ def pack_test_command(p: ServiceProviderParams):
if data_size < 0 or data_size > 1024:
print("Invalid data size")
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(
PusTelecommand(
service=PusServices.S17_TEST, subservice=130, app_data=dummy_data