add TMP1075 dev prompt
This commit is contained in:
parent
5e27a22a85
commit
b474841d69
@ -10,6 +10,10 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- TMP1075 comands: Implement proper prompt for device select.
|
||||||
|
|
||||||
# [v2.10.0] 2023-02-03
|
# [v2.10.0] 2023-02-03
|
||||||
|
|
||||||
tmtccmd v4.0.0rc0
|
tmtccmd v4.0.0rc0
|
||||||
|
@ -71,6 +71,7 @@ class CustomServiceList(str, enum.Enum):
|
|||||||
TIME = "time"
|
TIME = "time"
|
||||||
PROCEDURE = "proc"
|
PROCEDURE = "proc"
|
||||||
RTD = "rtd"
|
RTD = "rtd"
|
||||||
|
TMP1075 = "tcs_tmp"
|
||||||
TVTTESTPROCEDURE = "tvtestproc"
|
TVTTESTPROCEDURE = "tvtestproc"
|
||||||
CONTROLLERS = "controllers"
|
CONTROLLERS = "controllers"
|
||||||
SCEX = "scex"
|
SCEX = "scex"
|
||||||
|
@ -30,8 +30,10 @@ SCEX_HANDLER_ID = bytes([0x44, 0x33, 0x00, 0x32])
|
|||||||
# Thermal Object IDs
|
# Thermal Object IDs
|
||||||
THERMAL_CONTROLLER_ID = bytes([0x43, 0x40, 0x00, 0x01])
|
THERMAL_CONTROLLER_ID = bytes([0x43, 0x40, 0x00, 0x01])
|
||||||
HEATER_CONTROLLER_ID = bytes([0x44, 0x41, 0x00, 0xA4])
|
HEATER_CONTROLLER_ID = bytes([0x44, 0x41, 0x00, 0xA4])
|
||||||
TMP_1075_1_HANDLER_ID = bytes([0x44, 0x42, 0x00, 0x04])
|
TMP1075_HANDLER_TCS_BRD_0_ID = bytes([0x44, 0x42, 0x00, 0x04])
|
||||||
TMP_1075_2_HANDLER_ID = bytes([0x44, 0x42, 0x00, 0x05])
|
TMP1075_HANDLER_TCS_BRD_1_ID = bytes([0x44, 0x42, 0x00, 0x05])
|
||||||
|
TMP1075_HANDLER_PLPCDU_0_ID = bytes([0x44, 0x42, 0x00, 0x06])
|
||||||
|
TMP1075_HANDLER_IF_BRD_ID = bytes([0x44, 0x42, 0x00, 0x08])
|
||||||
|
|
||||||
# Communication Object IDs
|
# Communication Object IDs
|
||||||
SYRLINKS_HANDLER_ID = bytes([0x44, 0x53, 0x00, 0xA3])
|
SYRLINKS_HANDLER_ID = bytes([0x44, 0x53, 0x00, 0xA3])
|
||||||
|
@ -45,8 +45,10 @@ from eive_tmtc.config.object_ids import (
|
|||||||
PDU_1_HANDLER_ID,
|
PDU_1_HANDLER_ID,
|
||||||
PDU_2_HANDLER_ID,
|
PDU_2_HANDLER_ID,
|
||||||
ACU_HANDLER_ID,
|
ACU_HANDLER_ID,
|
||||||
TMP_1075_1_HANDLER_ID,
|
TMP1075_HANDLER_TCS_BRD_0_ID,
|
||||||
TMP_1075_2_HANDLER_ID,
|
TMP1075_HANDLER_TCS_BRD_1_ID,
|
||||||
|
TMP1075_HANDLER_PLPCDU_0_ID,
|
||||||
|
TMP1075_HANDLER_IF_BRD_ID,
|
||||||
HEATER_CONTROLLER_ID,
|
HEATER_CONTROLLER_ID,
|
||||||
IMTQ_HANDLER_ID,
|
IMTQ_HANDLER_ID,
|
||||||
RW1_ID,
|
RW1_ID,
|
||||||
@ -74,6 +76,8 @@ from eive_tmtc.pus_tc.system.proc import pack_proc_commands
|
|||||||
import eive_tmtc.config.object_ids as oids
|
import eive_tmtc.config.object_ids as oids
|
||||||
from tmtccmd.util import ObjectIdU32
|
from tmtccmd.util import ObjectIdU32
|
||||||
|
|
||||||
|
from eive_tmtc.utility.input_helper import InputHelper
|
||||||
|
|
||||||
|
|
||||||
def handle_default_procedure(
|
def handle_default_procedure(
|
||||||
tc_base: TcHandlerBase,
|
tc_base: TcHandlerBase,
|
||||||
@ -103,15 +107,17 @@ def handle_default_procedure(
|
|||||||
return pack_acu_commands(object_id=object_id, q=queue_helper, op_code=op_code)
|
return pack_acu_commands(object_id=object_id, q=queue_helper, op_code=op_code)
|
||||||
if service == CustomServiceList.TCS.value:
|
if service == CustomServiceList.TCS.value:
|
||||||
return pack_tcs_sys_commands(q=queue_helper, op_code=op_code)
|
return pack_tcs_sys_commands(q=queue_helper, op_code=op_code)
|
||||||
if service == CustomServiceList.TMP1075_1.value:
|
if service == CustomServiceList.TMP1075.value:
|
||||||
object_id = cast(ObjectIdU32, obj_id_man.get(TMP_1075_1_HANDLER_ID))
|
menu_dict = {
|
||||||
|
"0": ("TMP1075 TCS Board 0", TMP1075_HANDLER_TCS_BRD_0_ID),
|
||||||
|
"1": ("TMP1075 TCS Board 1", TMP1075_HANDLER_TCS_BRD_1_ID),
|
||||||
|
"2": ("TMP1075 PL PCDU 0", TMP1075_HANDLER_PLPCDU_0_ID),
|
||||||
|
"4": ("TMP1075 IF Board", TMP1075_HANDLER_IF_BRD_ID),
|
||||||
|
}
|
||||||
|
input_helper = InputHelper(menu_dict)
|
||||||
|
tmp_select = input_helper.get_key()
|
||||||
return pack_tmp1075_test_into(
|
return pack_tmp1075_test_into(
|
||||||
object_id=object_id, q=queue_helper, op_code=op_code
|
object_id=menu_dict[tmp_select][1], q=queue_helper, op_code=op_code
|
||||||
)
|
|
||||||
if service == CustomServiceList.TMP1075_2.value:
|
|
||||||
object_id = cast(ObjectIdU32, obj_id_man.get(TMP_1075_2_HANDLER_ID))
|
|
||||||
return pack_tmp1075_test_into(
|
|
||||||
object_id=object_id, q=queue_helper, op_code=op_code
|
|
||||||
)
|
)
|
||||||
if service == CustomServiceList.HEATER.value:
|
if service == CustomServiceList.HEATER.value:
|
||||||
object_id = HEATER_CONTROLLER_ID
|
object_id = HEATER_CONTROLLER_ID
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
@date 13.02.2021
|
@date 13.02.2021
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Tuple, Dict
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class InputHelper:
|
class InputHelper:
|
||||||
def __init__(self, menu: dict):
|
def __init__(self, menu: Dict[str, Tuple[str, ...]]):
|
||||||
"""
|
"""
|
||||||
@brief Constructor
|
@brief Constructor
|
||||||
@param menu The menu describing the input options
|
@param menu The menu describing the input options
|
||||||
|
Loading…
x
Reference in New Issue
Block a user