some fixes for common tmtc code

This commit is contained in:
Robin Müller 2023-01-13 11:07:08 +01:00
parent 8ad775e5be
commit c9ae13c16f
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 5 additions and 4 deletions

View File

@ -1,12 +1,14 @@
from tmtccmd.pus.pus_17_test import ( from tmtccmd.pus.pus_17_test import (
pack_service_17_ping_command, pack_service_17_ping_command,
pack_generic_service17_test,
) )
from tmtccmd.tc.queue import DefaultPusQueueHelper from tmtccmd.tc.queue import DefaultPusQueueHelper
from tmtccmd.logging import get_console_logger
LOGGER = get_console_logger()
def pack_service_17_commands(op_code: str, q: DefaultPusQueueHelper): def pack_service_17_commands(op_code: str, q: DefaultPusQueueHelper):
if op_code in ["0", "ping"]: if op_code in ["0", "ping"]:
q.add_pus_tc(pack_service_17_ping_command()) q.add_pus_tc(pack_service_17_ping_command())
else: else:
pack_generic_service17_test(q=q) LOGGER.warning(f"Invalid op code {op_code}")

View File

@ -1,8 +1,7 @@
from datetime import timedelta from datetime import timedelta
from spacepackets.ecss.tc import PusTelecommand from spacepackets.ecss.tc import PusTelecommand
from spacepackets.ecss import PusServices
from deps.spacepackets.spacepackets.ecss import PusServices
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
from tmtccmd.tc.pus_20_params import ( from tmtccmd.tc.pus_20_params import (