Skip to content

Commit

Permalink
update action cmd generator
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Aug 22, 2022
1 parent 87a430e commit acaea6d
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions tmtccmd/tc/pus_8_funccmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,15 @@

from spacepackets.ecss import PusTelecommand
from tmtccmd.pus.pus_8_funccmd import Subservices
from spacepackets.ecss.conf import get_default_tc_apid


def generate_action_command(
object_id: bytes,
action_id: int,
app_data: bytes = bytes(),
ssc: int = 0,
apid: int = -1,
def make_fsfw_action_cmd(
object_id: bytes, action_id: int, user_data: bytes = bytes()
) -> PusTelecommand:
if apid == -1:
apid = get_default_tc_apid()
data_to_pack = bytearray(object_id)
data_to_pack += make_action_id(action_id) + app_data
data_to_pack += make_action_id(action_id) + user_data
return PusTelecommand(
service=8,
subservice=Subservices.FUNCTIONAL_CMD,
seq_count=ssc,
app_data=data_to_pack,
apid=apid,
service=8, subservice=Subservices.FUNCTIONAL_CMD, app_data=data_to_pack
)


Expand Down

0 comments on commit acaea6d

Please sign in to comment.