some include fixes
This commit is contained in:
parent
9d105ee97f
commit
8891908afa
@ -8,6 +8,7 @@ from tmtccmd.config import (
|
|||||||
)
|
)
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from pus_tc.devs.heater import add_heater_cmds
|
from pus_tc.devs.heater import add_heater_cmds
|
||||||
|
from pus_tc.devs.reaction_wheels import add_rw_cmds
|
||||||
from pus_tc.devs.bpx_batt import BpxOpCodes
|
from pus_tc.devs.bpx_batt import BpxOpCodes
|
||||||
|
|
||||||
|
|
||||||
|
15
pus_tm/defs.py
Normal file
15
pus_tm/defs.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
|
||||||
|
|
||||||
|
|
||||||
|
class PrintWrapper:
|
||||||
|
def __init__(self, printer: FsfwTmTcPrinter):
|
||||||
|
self.printer = printer
|
||||||
|
|
||||||
|
def dlog(self, string: str):
|
||||||
|
print(string)
|
||||||
|
self.printer.file_logger.info(string)
|
||||||
|
|
||||||
|
|
||||||
|
def log_to_both(printer: FsfwTmTcPrinter, string: str):
|
||||||
|
print(string)
|
||||||
|
printer.file_logger.info(string)
|
@ -1,7 +1,7 @@
|
|||||||
import struct
|
import struct
|
||||||
|
|
||||||
from pus_tm.hk_handling import FsfwTmTcPrinter, PrintWrapper
|
from pus_tm.defs import PrintWrapper, FsfwTmTcPrinter
|
||||||
from tmtccmd.pus.obj_id import ObjectId
|
from tmtccmd.utility.obj_id import ObjectId
|
||||||
|
|
||||||
|
|
||||||
def handle_rw_hk_data(
|
def handle_rw_hk_data(
|
||||||
|
@ -18,25 +18,12 @@ from pus_tc.devs.imtq import ImtqSetIds
|
|||||||
from tmtccmd.utility.obj_id import ObjectId, ObjectIdDictT
|
from tmtccmd.utility.obj_id import ObjectId, ObjectIdDictT
|
||||||
import config.object_ids as obj_ids
|
import config.object_ids as obj_ids
|
||||||
|
|
||||||
from pus_tc.devs.reaction_wheels import handle_rw_hk_data
|
from pus_tm.devs.reaction_wheels import handle_rw_hk_data
|
||||||
|
from pus_tm.defs import PrintWrapper, FsfwTmTcPrinter
|
||||||
|
|
||||||
LOGGER = get_console_logger()
|
LOGGER = get_console_logger()
|
||||||
|
|
||||||
|
|
||||||
class PrintWrapper:
|
|
||||||
def __init__(self, printer: FsfwTmTcPrinter):
|
|
||||||
self.printer = printer
|
|
||||||
|
|
||||||
def dlog(self, string: str):
|
|
||||||
print(string)
|
|
||||||
self.printer.file_logger.info(string)
|
|
||||||
|
|
||||||
|
|
||||||
def log_to_both(printer: FsfwTmTcPrinter, string: str):
|
|
||||||
print(string)
|
|
||||||
printer.file_logger.info(string)
|
|
||||||
|
|
||||||
|
|
||||||
def handle_hk_packet(
|
def handle_hk_packet(
|
||||||
raw_tm: bytes,
|
raw_tm: bytes,
|
||||||
obj_id_dict: ObjectIdDictT,
|
obj_id_dict: ObjectIdDictT,
|
||||||
|
Loading…
Reference in New Issue
Block a user