refactor logging usage
This commit is contained in:
@ -1,14 +1,13 @@
|
||||
import enum
|
||||
import logging
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
||||
from tmtccmd.logging import get_console_logger
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class OpCode:
|
||||
@ -40,7 +39,7 @@ def add_gps_cmds(defs: TmtcDefinitionWrapper):
|
||||
def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in OpCode.RESET_GNSS:
|
||||
# TODO: This needs to be re-implemented
|
||||
LOGGER.warning("Reset pin handling needs to be re-implemented")
|
||||
_LOGGER.warning("Reset pin handling needs to be re-implemented")
|
||||
if op_code in OpCode.REQ_OS_HK:
|
||||
q.add_log_cmd(f"GMSS: {Info.REQ_OS_HK}")
|
||||
q.add_pus_tc(
|
||||
|
@ -1,4 +1,5 @@
|
||||
import enum
|
||||
import logging
|
||||
import struct
|
||||
import time
|
||||
from typing import Optional
|
||||
@ -24,11 +25,10 @@ from tmtccmd.tc.pus_20_fsfw_param import (
|
||||
create_load_param_cmd,
|
||||
pack_boolean_parameter_app_data,
|
||||
)
|
||||
from tmtccmd.logging import get_console_logger
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from eive_tmtc.config.object_ids import PL_PCDU_ID
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class OpCode:
|
||||
@ -369,10 +369,10 @@ def request_wait_time() -> Optional[float]:
|
||||
try:
|
||||
wait_time = float(wait_time)
|
||||
except ValueError:
|
||||
LOGGER.warning("Invalid input")
|
||||
_LOGGER.warning("Invalid input")
|
||||
continue
|
||||
if wait_time <= 0:
|
||||
LOGGER.warning("Invalid input")
|
||||
_LOGGER.warning("Invalid input")
|
||||
else:
|
||||
return wait_time
|
||||
|
||||
|
Reference in New Issue
Block a user