feat: 测试子任务读取配置文件
This commit is contained in:
@@ -4,7 +4,7 @@ logger_format = "{time} {level} {message}"
|
|||||||
|
|
||||||
[task]
|
[task]
|
||||||
GetBlock_enable = true # 人员施救使能
|
GetBlock_enable = true # 人员施救使能
|
||||||
PutBlock_enable = false # 紧急转移使能
|
PutBlock_enable = true # 紧急转移使能
|
||||||
GetBBall_enable = true # 整装上阵使能
|
GetBBall_enable = true # 整装上阵使能
|
||||||
UpTower_enable = true # 通信抢修使能
|
UpTower_enable = true # 通信抢修使能
|
||||||
GetRBall_enable = true # 高空排险使能
|
GetRBall_enable = true # 高空排险使能
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
[get_block]
|
||||||
|
|
||||||
|
[put_block]
|
||||||
|
|
||||||
|
[get_bball]
|
||||||
|
|
||||||
|
[up_tower]
|
||||||
|
|
||||||
|
[get_rball]
|
||||||
|
|
||||||
|
[put_bball]
|
||||||
|
|
||||||
|
[put_hanoi1]
|
||||||
|
|
||||||
|
[put_hanoi2]
|
||||||
|
|
||||||
|
[move_area]
|
||||||
|
|
||||||
|
[kick_ass]
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ from enum import Enum
|
|||||||
from loguru import logger
|
from loguru import logger
|
||||||
from utils import label_filter
|
from utils import label_filter
|
||||||
from utils import tlabel
|
from utils import tlabel
|
||||||
|
import toml
|
||||||
import time
|
import time
|
||||||
|
|
||||||
# 任务类
|
# 任务类
|
||||||
@@ -86,6 +87,7 @@ class get_block():
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
def exec():
|
def exec():
|
||||||
|
cfg = toml.load('cfg_subtask.toml') # 加载任务配置
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@@ -100,6 +102,7 @@ class put_block():
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
def exec():
|
def exec():
|
||||||
|
cfg = toml.load('cfg_subtask.toml') # 加载任务配置
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# 整装上阵
|
# 整装上阵
|
||||||
|
|||||||
Reference in New Issue
Block a user