Updated S/A depl command #118
24
.run/SA Deployment.run.xml
Normal file
24
.run/SA Deployment.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="SA Deployment" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s sa_depl -l" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
@ -10,7 +10,12 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
# [v1.13.0]
|
# [v1.14.0]
|
||||||
|
|
||||||
|
- Updates S/A deployment command
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/118
|
||||||
|
|
||||||
|
# [v1.13.0] 13.10.2022
|
||||||
|
|
||||||
- CFDP integration
|
- CFDP integration
|
||||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/113
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/113
|
||||||
|
@ -92,11 +92,15 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
11405;0x2c8d;SWITCH_ALREADY_OFF;LOW;;mission/devices/HeaterHandler.h
|
11405;0x2c8d;SWITCH_ALREADY_OFF;LOW;;mission/devices/HeaterHandler.h
|
||||||
11406;0x2c8e;MAIN_SWITCH_TIMEOUT;MEDIUM;;mission/devices/HeaterHandler.h
|
11406;0x2c8e;MAIN_SWITCH_TIMEOUT;MEDIUM;;mission/devices/HeaterHandler.h
|
||||||
11407;0x2c8f;FAULTY_HEATER_WAS_ON;LOW;;mission/devices/HeaterHandler.h
|
11407;0x2c8f;FAULTY_HEATER_WAS_ON;LOW;;mission/devices/HeaterHandler.h
|
||||||
11500;0x2cec;MAIN_SWITCH_ON_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
|
11500;0x2cec;BURN_PHASE_START;INFO;P1: Burn duration in milliseconds, P2: Dry run flag;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11501;0x2ced;MAIN_SWITCH_OFF_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
|
11501;0x2ced;BURN_PHASE_DONE;INFO;P1: Burn duration in milliseconds, P2: Dry run flag;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11502;0x2cee;DEPLOYMENT_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
11502;0x2cee;MAIN_SWITCH_ON_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11503;0x2cef;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
11503;0x2cef;MAIN_SWITCH_OFF_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11504;0x2cf0;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
11504;0x2cf0;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
|
11505;0x2cf1;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
|
11506;0x2cf2;DEPL_SA1_GPIO_SWTICH_OFF_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
|
11507;0x2cf3;DEPL_SA2_GPIO_SWTICH_OFF_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
|
11508;0x2cf4;AUTONOMOUS_DEPLOYMENT_COMPLETED;INFO;;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
11601;0x2d51;MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC crc failure in telemetry packet;linux/devices/ploc/PlocMPSoCHandler.h
|
11601;0x2d51;MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC crc failure in telemetry packet;linux/devices/ploc/PlocMPSoCHandler.h
|
||||||
11602;0x2d52;ACK_FAILURE;LOW;PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
|
11602;0x2d52;ACK_FAILURE;LOW;PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
|
||||||
11603;0x2d53;EXE_FAILURE;LOW;PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
|
11603;0x2d53;EXE_FAILURE;LOW;PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
|
||||||
|
|
2
deps/tmtccmd
vendored
2
deps/tmtccmd
vendored
@ -1 +1 @@
|
|||||||
Subproject commit f3ea4108bd694c751887c1cbc2337a29eee064df
|
Subproject commit a3dcf7125c04440c4cb7612051ebbbd2b7c6b800
|
@ -1,22 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
@file solar_array_deployment.py
|
|
||||||
@brief The test function in this file simply returns a command which triggers the solar array deployment.
|
|
||||||
@author J. Meier
|
|
||||||
@date 15.02.2021
|
|
||||||
"""
|
|
||||||
from spacepackets.ecss import PusTelecommand
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
|
||||||
|
|
||||||
|
|
||||||
class ActionIds:
|
|
||||||
DEPLOY_SOLAR_ARRAYS = bytearray([0x0, 0x0, 0x0, 0x5])
|
|
||||||
|
|
||||||
|
|
||||||
def pack_solar_array_deployment_test_into(
|
|
||||||
object_id: bytearray, q: DefaultPusQueueHelper
|
|
||||||
):
|
|
||||||
q.add_log_cmd("Testing S/A Deployment")
|
|
||||||
|
|
||||||
command = object_id + ActionIds.DEPLOY_SOLAR_ARRAYS
|
|
||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
|
@ -27,7 +27,7 @@ from tmtc.power.p60dock import pack_p60dock_cmds
|
|||||||
from tmtc.power.pdu2 import pack_pdu2_commands
|
from tmtc.power.pdu2 import pack_pdu2_commands
|
||||||
from tmtc.power.pdu1 import pack_pdu1_commands
|
from tmtc.power.pdu1 import pack_pdu1_commands
|
||||||
from tmtc.power.acu import pack_acu_commands
|
from tmtc.power.acu import pack_acu_commands
|
||||||
from pus_tc.devs.solar_array_deployment import pack_solar_array_deployment_test_into
|
from tmtc.solar_array_deployment import pack_solar_array_deployment_test_into
|
||||||
from pus_tc.devs.imtq import pack_imtq_test_into
|
from pus_tc.devs.imtq import pack_imtq_test_into
|
||||||
from pus_tc.devs.tmp1075 import pack_tmp1075_test_into
|
from pus_tc.devs.tmp1075 import pack_tmp1075_test_into
|
||||||
from pus_tc.devs.heater import pack_heater_cmds
|
from pus_tc.devs.heater import pack_heater_cmds
|
||||||
@ -185,10 +185,6 @@ def handle_default_procedure(
|
|||||||
return pack_syrlinks_command(
|
return pack_syrlinks_command(
|
||||||
object_id=object_id, q=queue_helper, op_code=op_code
|
object_id=object_id, q=queue_helper, op_code=op_code
|
||||||
)
|
)
|
||||||
if service == CustomServiceList.SA_DEPLYOMENT.value:
|
|
||||||
return pack_solar_array_deployment_test_into(
|
|
||||||
object_id=SOLAR_ARRAY_DEPLOYMENT_ID, q=queue_helper
|
|
||||||
)
|
|
||||||
if service == CustomServiceList.PROCEDURE.value:
|
if service == CustomServiceList.PROCEDURE.value:
|
||||||
return pack_proc_commands(q=queue_helper, op_code=op_code)
|
return pack_proc_commands(q=queue_helper, op_code=op_code)
|
||||||
if service == CustomServiceList.SUS_ASS.value:
|
if service == CustomServiceList.SUS_ASS.value:
|
||||||
|
78
tmtc/solar_array_deployment.py
Normal file
78
tmtc/solar_array_deployment.py
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
@file solar_array_deployment.py
|
||||||
|
@brief The test function in this file simply returns a command which triggers the solar array deployment.
|
||||||
|
@author J. Meier
|
||||||
|
@date 15.02.2021
|
||||||
|
"""
|
||||||
|
import struct
|
||||||
|
|
||||||
|
from config.definitions import CustomServiceList
|
||||||
|
from config.object_ids import SOLAR_ARRAY_DEPLOYMENT_ID
|
||||||
|
from tmtccmd.config.tmtc import (
|
||||||
|
tmtc_definitions_provider,
|
||||||
|
TmtcDefinitionWrapper,
|
||||||
|
OpCodeEntry,
|
||||||
|
)
|
||||||
|
from tmtccmd.tc import service_provider
|
||||||
|
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||||
|
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||||
|
from tmtccmd import get_console_logger
|
||||||
|
|
||||||
|
LOGGER = get_console_logger()
|
||||||
|
|
||||||
|
|
||||||
|
class OpCodes:
|
||||||
|
MANUAL_DEPLOYMENT = "man_depl"
|
||||||
|
|
||||||
|
|
||||||
|
class Info:
|
||||||
|
MANUAL_DEPLOYMENT = "Manual Solar Array Deployment"
|
||||||
|
|
||||||
|
|
||||||
|
class ActionIds:
|
||||||
|
MANUAL_DEPLOYMENT = 5
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def pack_sa_depl_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add(keys=OpCodes.MANUAL_DEPLOYMENT, info=Info.MANUAL_DEPLOYMENT)
|
||||||
|
defs.add_service(
|
||||||
|
name=CustomServiceList.SA_DEPLYOMENT,
|
||||||
|
info="Solar Array Deployment",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@service_provider(CustomServiceList.SA_DEPLYOMENT)
|
||||||
|
def pack_solar_array_deployment_test_into(p: ServiceProviderParams):
|
||||||
|
q = p.queue_helper
|
||||||
|
user_data = bytearray()
|
||||||
|
while True:
|
||||||
|
burn_time = int(input("Please specify burn time in seconds [0-120 secs]: "))
|
||||||
|
if burn_time < 0 or burn_time > 120:
|
||||||
|
LOGGER.warning(f"Invalid burn time {burn_time}")
|
||||||
|
continue
|
||||||
|
user_data.extend(struct.pack("!I", burn_time))
|
||||||
|
break
|
||||||
|
while True:
|
||||||
|
dry_run = input("Dry run? [y/n]: ")
|
||||||
|
if dry_run in ["yes", "y", "1"]:
|
||||||
|
dry_run = 1
|
||||||
|
elif dry_run in ["no", "n", "0"]:
|
||||||
|
dry_run = 0
|
||||||
|
else:
|
||||||
|
LOGGER.warning("Invalid input for dry run parameter")
|
||||||
|
continue
|
||||||
|
user_data.append(dry_run)
|
||||||
|
break
|
||||||
|
if dry_run == 1:
|
||||||
|
dry_run_str = " as dry run"
|
||||||
|
else:
|
||||||
|
dry_run_str = ""
|
||||||
|
q.add_log_cmd(f"Testing S/A Deployment with burn time {burn_time}{dry_run_str}")
|
||||||
|
command = make_fsfw_action_cmd(
|
||||||
|
SOLAR_ARRAY_DEPLOYMENT_ID, ActionIds.MANUAL_DEPLOYMENT, user_data
|
||||||
|
)
|
||||||
|
q.add_pus_tc(command)
|
Loading…
Reference in New Issue
Block a user