some tweaks

This commit is contained in:
Robin Müller 2023-02-06 14:49:50 +01:00
parent fc5e3c88ff
commit e617faa4df
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 9 additions and 4 deletions

View File

@ -5,9 +5,10 @@
"""
import logging
import os.path
from typing import Dict
from eive_tmtc import EIVE_TMTC_ROOT
from tmtccmd.util.obj_id import ObjectIdDictT
from tmtccmd.util.obj_id import ObjectIdDictT, ObjectIdU32
from tmtccmd.fsfw import parse_fsfw_objects_csv
@ -141,7 +142,10 @@ ACS_CONTROLLER = bytes([0x43, 0x00, 0x00, 0x02])
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
def get_object_ids() -> ObjectIdDictT:
ObjectIdDict = Dict[bytes, ObjectIdU32]
def get_object_ids() -> ObjectIdDict:
global __OBJECT_ID_DICT
if not os.path.exists(DEFAULT_OBJECTS_CSV_PATH):
logging.getLogger(__name__).warning(

View File

@ -116,8 +116,9 @@ def handle_default_procedure(
}
input_helper = InputHelper(menu_dict)
tmp_select = input_helper.get_key()
object_id = obj_id_man.get(menu_dict[tmp_select][1])
return pack_tmp1075_test_into(
object_id=menu_dict[tmp_select][1], q=queue_helper, op_code=op_code
object_id=object_id, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.HEATER.value:
object_id = HEATER_CONTROLLER_ID

View File

@ -47,7 +47,7 @@ def pack_tmp1075_test_into(
object_id: ObjectIdU32, op_code: str, q: DefaultPusQueueHelper
):
q.add_log_cmd(
f"Testing Tmp1075 Temperature Sensor Handler with object id: {object_id.as_hex_string}"
f"Testing Tmp1075 Temperature Sensor Handler with object id: {object_id}"
)
obyt = object_id.as_bytes
if op_code == OpCode.OFF: