diff --git a/config/obsw_config.py b/config/obsw_config.py index e04f16a58a8c5e2855dcd1ca52a21cbce351fe73..134df1633c8c3db1b153e459f029581fda23a4e4 100644 --- a/config/obsw_config.py +++ b/config/obsw_config.py @@ -83,6 +83,8 @@ G_MODE_ID = 0 G_SERVICE = 17 G_DISPLAY_MODE = "long" +# Binary Upload Settings +G_MAX_BINARY_FRAME_LENGTH = 1000 G_COM_IF = 2 # COM Port for serial communication diff --git a/utility/obsw_binary_uploader.py b/utility/obsw_binary_uploader.py index 4b5b55220e8449a6d63981963f79f147c6840a61..b6d836a00ca6fd255f7feb46ca6dc1ffe952833a 100644 --- a/utility/obsw_binary_uploader.py +++ b/utility/obsw_binary_uploader.py @@ -9,6 +9,7 @@ It will be possible to encode the data (for example using DLE encoding) import tkinter as tk from tkinter import filedialog +import config.obsw_config as g def perform_binary_upload(): root = tk.Tk() @@ -25,6 +26,10 @@ def perform_binary_upload(): calc_hamming_code = False print("Hamming code will not be calculated") + # Right now, the size of PUS packets is limited to 1024 bytes. Therefore, we split up the + # binary in 1000 byte packets + frame_length = g.G_MAX_BINARY_FRAME_LENGTH + if calc_hamming_code: # now we calculate the hamming code pass