v1.11.0 #72

Merged
muellerr merged 72 commits from develop into master 2022-05-17 15:04:48 +02:00
4 changed files with 20 additions and 17 deletions
Showing only changes of commit 8891908afa - Show all commits

View File

@ -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
View 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)

View File

@ -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(

View File

@ -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,