some fixes (some pep related)
This commit is contained in:
parent
04920feea5
commit
dc999188c0
@ -15,4 +15,3 @@ class CustomServiceList(enum.IntEnum):
|
||||
TMP1075_1 = "tmp1075_1"
|
||||
TMP1075_2 = "tmp1075_2"
|
||||
HEATER = "heater"
|
||||
|
||||
|
@ -26,8 +26,7 @@ class CustomGlobalIds(enum.Enum):
|
||||
pass
|
||||
|
||||
|
||||
def add_globals_pre_args_parsing(gui: bool = False):
|
||||
|
||||
def set_globals_pre_args_parsing(gui: bool = False):
|
||||
set_default_globals_pre_args_parsing(apid=0x65, com_if_id=CoreComInterfaces.EthernetUDP)
|
||||
|
||||
servicelist = dict()
|
||||
|
@ -20,8 +20,8 @@ class EiveHookObject(TmTcHookBase):
|
||||
return f"{SW_NAME} {VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_SUBMINOR}"
|
||||
|
||||
def add_globals_pre_args_parsing(self, gui: bool = False):
|
||||
from config.globals_config import add_globals_pre_args_parsing
|
||||
add_globals_pre_args_parsing(gui)
|
||||
from config.globals_config import set_globals_pre_args_parsing
|
||||
set_globals_pre_args_parsing(gui=gui)
|
||||
|
||||
def add_globals_post_args_parsing(self, args: argparse.Namespace):
|
||||
from config.globals_config import add_globals_post_args_parsing
|
||||
|
@ -5,6 +5,7 @@
|
||||
@author J. Meier
|
||||
@date 17.12.2020
|
||||
"""
|
||||
from tmtccmd.core.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.pus_tc.packer import TcQueueT
|
||||
from tmtccmd.pus_tc.base import PusTelecommand
|
||||
@ -25,24 +26,30 @@ class PDU1TestProcedure:
|
||||
read_temperature = False
|
||||
|
||||
|
||||
def pack_pdu1_test_into(pdu1_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
tc_queue.appendleft(("print", "Testing PDU1"))
|
||||
def pack_pdu1_test_into(
|
||||
pdu1_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT
|
||||
):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing PDU1"))
|
||||
|
||||
tc_queue.appendleft(("print", "P60 Dock: Enabling PDU1"))
|
||||
command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_1.parameter_address,
|
||||
P60DockConfigTable.out_en_1.parameter_size, Channel.on)
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Enabling PDU1"))
|
||||
command = pack_set_param_command(
|
||||
p60dock_object_id, P60DockConfigTable.out_en_1.parameter_address,
|
||||
P60DockConfigTable.out_en_1.parameter_size, Channel.on
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
||||
tc_queue.appendleft(("print", "PDU1: Ping Test"))
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
|
||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||
command = pack_ping_command(pdu1_object_id, ping_data)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.read_temperature:
|
||||
tc_queue.appendleft(("print", "PDU1: Testing temperature reading"))
|
||||
command = pack_get_param_command(pdu1_object_id, TableIds.hk, PDUHkTable.temperature.parameter_address,
|
||||
PDUHkTable.temperature.parameter_size)
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Testing temperature reading"))
|
||||
command = pack_get_param_command(
|
||||
pdu1_object_id, TableIds.hk, PDUHkTable.temperature.parameter_address,
|
||||
PDUHkTable.temperature.parameter_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
@ -5,6 +5,7 @@
|
||||
@author J. Meier
|
||||
@date 06.01.2021
|
||||
"""
|
||||
from tmtccmd.core.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.pus_tc.packer import TcQueueT
|
||||
from tmtccmd.pus_tc.base import PusTelecommand
|
||||
@ -30,29 +31,31 @@ class Tmp1075ActionIds:
|
||||
|
||||
|
||||
def pack_tmp1075_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
tc_queue.appendleft(("print", "Testing Tmp1075 Temperature Sensor Handler with object id: 0x" +
|
||||
object_id.hex()))
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing Tmp1075 Temperature Sensor Handler with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if Tmp1075TestProcedure.all or Tmp1075TestProcedure.start_adc_conversion:
|
||||
tc_queue.appendleft(("print", "TMP1075: Starting new temperature conversion"))
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Starting new temperature conversion"))
|
||||
command = object_id + Tmp1075ActionIds.start_adc_conversion
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if Tmp1075TestProcedure.all or Tmp1075TestProcedure.get_temp:
|
||||
tc_queue.appendleft(("print", "TMP1075: Read temperature"))
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Read temperature"))
|
||||
command = object_id + Tmp1075ActionIds.get_temp
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if Tmp1075TestProcedure.set_mode_normal:
|
||||
tc_queue.appendleft(("print", "TMP1075: Set Mode Normal"))
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Set Mode Normal"))
|
||||
mode_data = pack_mode_data(object_id, 2, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=220, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if Tmp1075TestProcedure.set_mode_on:
|
||||
tc_queue.appendleft(("print", "TMP1075: Set Mode On"))
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Set Mode On"))
|
||||
mode_data = pack_mode_data(object_id, 1, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=221, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
2
tmtccmd
2
tmtccmd
@ -1 +1 @@
|
||||
Subproject commit bef9dc2b1bd046521f215901812fbbe8668a418c
|
||||
Subproject commit 6cdd05fbe1c4582a23a975a5401bf5fe833c04b8
|
Loading…
Reference in New Issue
Block a user