首次提交完整的python工程代码
This commit is contained in:
20
core/global_params.py
Normal file
20
core/global_params.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# 全局遥测参数存储器
|
||||
# 结构:{ "参数代号": 值 }
|
||||
TELEM_PARAMS = {}
|
||||
|
||||
# 分类顺序(你要求的顺序)
|
||||
# 1. 测控
|
||||
# 2. 星间链路终端
|
||||
# 3. SADA
|
||||
# 4. 能源
|
||||
|
||||
def set_param(param_code, value):
|
||||
"""设置参数:代号 + 值"""
|
||||
TELEM_PARAMS[param_code] = value
|
||||
|
||||
def get_param(param_code, default=0):
|
||||
"""获取参数值"""
|
||||
return TELEM_PARAMS.get(param_code, default)
|
||||
|
||||
def clear_params():
|
||||
TELEM_PARAMS.clear()
|
||||
Reference in New Issue
Block a user