From b6ec7da7fa8229f2f84f4dad65a4df0ad23736ff Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 16:26:33 +0200 Subject: [PATCH 1/2] force flag cp helper --- CHANGELOG.md | 6 ++++++ eive_tmtc/tmtc/core.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0c9112..8f20da8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ list yields a list of all related PRs for each release. # [unreleased] +# [v5.0.0] + +## Changed + +- Force flag for copy helper. + # [v4.1.0] 2023-06-14 ## Added diff --git a/eive_tmtc/tmtc/core.py b/eive_tmtc/tmtc/core.py index 68f435c..6f1d0f2 100644 --- a/eive_tmtc/tmtc/core.py +++ b/eive_tmtc/tmtc/core.py @@ -392,7 +392,10 @@ def pack_core_commands( # noqa C901 cp_recursive = int(input("Copy recursively (0/1) ?: ")) if cp_recursive not in [0, 1]: raise ValueError("Invalid value, only 0 or 1 allowed") - user_data = bytearray([cp_recursive]) + cp_force = int(input("Copy with force option(0/1) ?: ")) + if cp_force not in [0, 1]: + raise ValueError("Invalid value, only 0 or 1 allowed") + user_data = bytearray([cp_recursive, cp_force]) user_data.extend(packet_source_dest_path("Copy")) q.add_log_cmd(Info.CP_HELPER) q.add_pus_tc( From 68d74a474899829d6c42dd43ab376107e6ddfb93 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 16:26:47 +0200 Subject: [PATCH 2/2] fix --- eive_tmtc/tmtc/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eive_tmtc/tmtc/core.py b/eive_tmtc/tmtc/core.py index 6f1d0f2..a08dc5c 100644 --- a/eive_tmtc/tmtc/core.py +++ b/eive_tmtc/tmtc/core.py @@ -385,7 +385,7 @@ def pack_core_commands( # noqa C901 domain_id=0, unique_id=ParamId.PREF_SD, parameter=pref_sd, - ).pack() + ) ) ) elif op_code == OpCode.CP_HELPER: