From 427d1ef11fe11fe1788bbe820eed89646b219773 Mon Sep 17 00:00:00 2001
From: "Robin.Mueller" <robin.mueller.m@gmail.com>
Date: Wed, 19 Aug 2020 22:03:19 +0200
Subject: [PATCH] continued binary uploader

---
 config/obsw_config.py           | 2 ++
 utility/obsw_binary_uploader.py | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/config/obsw_config.py b/config/obsw_config.py
index e04f16a..134df16 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 4b5b552..b6d836a 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
-- 
GitLab