Compare commits

...

10 Commits

Author SHA1 Message Date
24a4fcdeaf update changelog 2022-12-01 14:43:24 +01:00
30216bcd1b only load PyQt components if installed 2022-12-01 14:41:28 +01:00
8a600f9d2b bump deps 2022-12-01 14:25:09 +01:00
68e3203540 this works 2022-12-01 14:16:06 +01:00
16e4853582 some fixes for old proc cmds 2022-12-01 11:18:11 +01:00
140c827ce7 that should do the job 2022-12-01 11:14:28 +01:00
c421f3f5d7 some bugfixes 2022-11-30 17:26:25 +01:00
4cfd2d684a bump revision 2022-11-29 17:02:37 +01:00
2df1f79164 bump changelog 2022-11-29 17:01:35 +01:00
f2a8e4d21a clean up version handling 2022-11-29 17:00:37 +01:00
15 changed files with 83 additions and 49 deletions

View File

@ -8,8 +8,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
The [milestone](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/milestones)
list yields a list of all related PRs for each release.
# [unreleased]
# [v2.0.2] 01.12.2022
- Bumped dependencies, small fix to allow working script if PyQt is not installed
# [v2.0.1] 29.11.2022
- Minor bugfix
# [v2.0.0] 29.11.2022
- The tmtc program is installable now, which allow re-using it in other Python applications
- Bugfixes for IMTQ TM handling
- Updates S/A deployment command
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/118

2
deps/tmtccmd vendored

View File

@ -1,6 +1,11 @@
SW_NAME = "eive"
VERSION_MAJOR = 1
VERSION_MINOR = 13
VERSION_SUBMINOR = 0
from pathlib import Path
__version__ = "1.13.0"
SW_NAME = "eive-tmtc"
VERSION_MAJOR = 2
VERSION_MINOR = 0
VERSION_REVISION = 2
__version__ = "2.0.2"
EIVE_TMTC_ROOT = Path(__file__).parent
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent

View File

@ -1,6 +0,0 @@
SW_NAME = "eive-tmtc"
VERSION_MAJOR = 2
VERSION_MINOR = 0
VERSION_SUBMINOR = 0
__version__ = "2.0.0"

View File

@ -9,6 +9,8 @@ import enum
from spacepackets import PacketType
from spacepackets.ccsds import PacketId
from spacepackets.util import UnsignedByteField
from pathlib import Path
PUS_APID = 0x65
CFDP_APID = 0x66

View File

@ -0,0 +1,21 @@
import os
from eive_tmtc import EIVE_TMTC_ROOT
from tmtccmd import get_console_logger
from tmtccmd.fsfw import parse_fsfw_events_csv
from tmtccmd.pus.pus_5_event import EventDictT
LOGGER = get_console_logger()
DEFAULT_EVENTS_CSV_PATH = EIVE_TMTC_ROOT / "/config/events.csv"
__EVENT_DICT = None
def get_event_dict() -> EventDictT:
global __EVENT_DICT
if __EVENT_DICT is None:
if os.path.exists(DEFAULT_EVENTS_CSV_PATH):
__EVENT_DICT = parse_fsfw_events_csv(DEFAULT_EVENTS_CSV_PATH)
else:
LOGGER.warning(f"No Event CSV file found at {DEFAULT_EVENTS_CSV_PATH}")
__EVENT_DICT = dict()
return __EVENT_DICT

View File

@ -4,13 +4,15 @@
it to your needs.
"""
import os.path
from eive_tmtc import EIVE_TMTC_ROOT
from tmtccmd.util.obj_id import ObjectIdDictT
from tmtccmd.fsfw import parse_fsfw_objects_csv
from tmtccmd.logging import get_console_logger
LOGGER = get_console_logger()
DEFAULT_OBJECTS_CSV_PATH = "config/objects.csv"
DEFAULT_OBJECTS_CSV_PATH = EIVE_TMTC_ROOT / "config/objects.csv"
__OBJECT_ID_DICT = None

View File

@ -1,8 +1,10 @@
import os
from eive_tmtc import EIVE_TMTC_ROOT
from tmtccmd.fsfw import parse_fsfw_returnvalues_csv, RetvalDictT
from tmtccmd.logging import get_console_logger
DEFAULT_RETVAL_CSV_NAME = "config/returnvalues.csv"
DEFAULT_RETVAL_CSV_NAME = EIVE_TMTC_ROOT / "config/returnvalues.csv"
__RETVAL_DICT = None
LOGGER = get_console_logger()

View File

@ -7,10 +7,6 @@ from tmtccmd.util import ObjectIdU32, ObjectIdBase
from eive_tmtc.tmtc.common import pack_mode_cmd_with_info
import eive_tmtc.config.object_ids as obj_ids
from eive_tmtc.pus_tc.prompt_parameters import (
prompt_parameters_cli,
prompt_parameters_gui,
)
class OpCodes:
@ -26,11 +22,15 @@ class Info:
def pack_cmd_ctrl_to_prompted_mode(
q: DefaultPusQueueHelper, object_id: ObjectIdU32, gui: bool
):
from eive_tmtc.pus_tc.prompt_parameters import (
prompt_parameters_cli,
)
param_list = [
{"name": "Mode", "defaultValue": "2"},
{"name": "Submode", "defaultValue": "0"},
]
if gui:
from eive_tmtc.pus_tc.prompt_parameters import prompt_parameters_gui
parameters = prompt_parameters_gui(param_list)
else:
parameters = prompt_parameters_cli(param_list)

View File

@ -10,6 +10,7 @@ from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
from tmtccmd.config.tmtc import tmtc_definitions_provider
from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.decorator import ServiceProviderParams
from tmtccmd.tc.pus_11_tc_sched import (
generate_time_tagged_cmd,
generate_enable_tc_sched_cmd,
@ -32,7 +33,11 @@ from eive_tmtc.pus_tc.devs.gps import SetIds as GpsSetIds
from eive_tmtc.tmtc.acs.imtq import ImtqSetIds
from eive_tmtc.pus_tc.devs.sus import SetIds
from eive_tmtc.pus_tc.devs.star_tracker import SetIds as StrSetIds
from eive_tmtc.tmtc.acs.reaction_wheels import RwSetIds, rw_speed_up_cmd_consec
from eive_tmtc.tmtc.acs.reaction_wheels import (
RwSetIds,
rw_speed_up_cmd_consec,
rw_speed_down_cmd_consec,
)
from eive_tmtc.pus_tc.system.controllers import (
pack_cmd_ctrl_to_off,
pack_cmd_ctrl_to_nml,

View File

@ -1,6 +1,6 @@
import logging
import os.path
from datetime import datetime
from eive_tmtc.config.events import get_event_dict
from eive_tmtc.config.object_ids import get_object_ids
from eive_tmtc.pus_tm.defs import PrintWrapper
from eive_tmtc.pus_tm.verification_handler import generic_retval_printout
@ -10,23 +10,9 @@ from tmtccmd.tc.pus_200_fsfw_modes import Modes
from tmtccmd.tm import Service5Tm
from tmtccmd.logging import get_console_logger
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.fsfw import parse_fsfw_events_csv, EventDictT, EventInfo
from tmtccmd.fsfw import EventInfo
LOGGER = get_console_logger()
DEFAULT_EVENTS_CSV_PATH = "config/events.csv"
__EVENT_DICT = None
def get_event_dict() -> EventDictT:
global __EVENT_DICT
if __EVENT_DICT is None:
if os.path.exists(DEFAULT_EVENTS_CSV_PATH):
__EVENT_DICT = parse_fsfw_events_csv(DEFAULT_EVENTS_CSV_PATH)
else:
LOGGER.warning(f"No Event CSV file found at {DEFAULT_EVENTS_CSV_PATH}")
__EVENT_DICT = dict()
return __EVENT_DICT
def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):

View File

@ -6,7 +6,7 @@ from tmtccmd.config.tmtc import (
TmtcDefinitionWrapper,
OpCodeEntry,
)
from tmtccmd.tc import service_provider
from tmtccmd.tc import service_provider, DefaultPusQueueHelper
from tmtccmd.tc.decorator import ServiceProviderParams
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from eive_tmtc.config.object_ids import ACS_BOARD_ASS_ID
@ -30,10 +30,7 @@ class DualSideSubmodes(enum.IntEnum):
DUAL_SIDE = 2
@service_provider(CustomServiceList.ACS_BRD_ASS)
def pack_acs_command(p: ServiceProviderParams):
op_code = p.op_code
q = p.queue_helper
def pack_acs_command(q: DefaultPusQueueHelper, op_code: str):
if op_code in AcsOpCodes.ACS_ASS_A_SIDE:
pack_mode_cmd_with_info(
object_id=ACS_BOARD_ASS_ID,
@ -92,6 +89,13 @@ def pack_acs_command(p: ServiceProviderParams):
)
@service_provider(CustomServiceList.ACS_BRD_ASS)
def pack_acs_command_provider(p: ServiceProviderParams):
op_code = p.op_code
q = p.queue_helper
pack_acs_command(q, op_code)
@tmtc_definitions_provider
def add_acs_board_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()

View File

@ -7,7 +7,7 @@ from tmtccmd.config.tmtc import (
TmtcDefinitionWrapper,
OpCodeEntry,
)
from tmtccmd.tc import service_provider
from tmtccmd.tc import service_provider, DefaultPusQueueHelper
from tmtccmd.tc.decorator import ServiceProviderParams
from tmtccmd.tc.pus_200_fsfw_modes import Modes
@ -19,10 +19,7 @@ class SusOpCodes:
SUS_ASS_OFF = ["3", "off"]
@service_provider(CustomServiceList.SUS_BRD_ASS)
def pack_sus_cmds(p: ServiceProviderParams):
op_code = p.op_code
q = p.queue_helper
def pack_sus_cmds(q: DefaultPusQueueHelper, op_code: str):
if op_code in SusOpCodes.SUS_ASS_NOM_SIDE:
pack_mode_cmd_with_info(
object_id=SUS_BOARD_ASS_ID,
@ -57,6 +54,13 @@ def pack_sus_cmds(p: ServiceProviderParams):
)
@service_provider(CustomServiceList.SUS_BRD_ASS)
def pack_sus_cmds_prvoider(p: ServiceProviderParams):
op_code = p.op_code
q = p.queue_helper
pack_sus_cmds(q, op_code)
@tmtc_definitions_provider
def add_sus_board_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()

View File

@ -27,7 +27,7 @@ classifiers =
[options]
install_requires =
tmtccmd >= 3.0.0rc2
tmtccmd >= 3.0.0rc3
packages = find:
python_requires = >=3.8