feat: 测试子任务读取配置文件

This commit is contained in:
bmy
2024-05-23 14:33:20 +08:00
parent 64970fd6a7
commit e3734c5ead
3 changed files with 31 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ logger_format = "{time} {level} {message}"
[task]
GetBlock_enable = true # 人员施救使能
PutBlock_enable = false # 紧急转移使能
PutBlock_enable = true # 紧急转移使能
GetBBall_enable = true # 整装上阵使能
UpTower_enable = true # 通信抢修使能
GetRBall_enable = true # 高空排险使能

View File

@@ -0,0 +1,19 @@
[get_block]
[put_block]
[get_bball]
[up_tower]
[get_rball]
[put_bball]
[put_hanoi1]
[put_hanoi2]
[move_area]
[kick_ass]

View File

@@ -2,6 +2,7 @@ from enum import Enum
from loguru import logger
from utils import label_filter
from utils import tlabel
import toml
import time
# 任务类
@@ -86,6 +87,7 @@ class get_block():
else:
return False
def exec():
cfg = toml.load('cfg_subtask.toml') # 加载任务配置
pass
@@ -100,6 +102,7 @@ class put_block():
else:
return False
def exec():
cfg = toml.load('cfg_subtask.toml') # 加载任务配置
pass
# 整装上阵