Skip to content

Commit

Permalink
chore: 文档和sample细节
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Sep 13, 2024
1 parent 8c5cf3c commit dddf04e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/zh_cn/0.1-开发思路.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main():
# 启动 MaaPiCli
maafw.Toolkit.run_pi_cli("C:/MaaXXX/resource", "C:/MaaXXX/cache")

class MyReco(CustomRecognizer):
class MyRecognizer(CustomRecognizer):
def analyze(context, ...):
# 获取图片,然后进行自己的图像操作
image = context.tasker.controller.cached_image
Expand Down
3 changes: 1 addition & 2 deletions sample/python/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def main():
print("Failed to init MAA.")
exit()

my_rec = MyRecognizer()
resource.register_custom_recognizer("MyRec", my_rec)
resource.register_custom_recognizer("MyRec", MyRecognizer())

task_detail = tasker.post_pipeline("StartUpAndClickButton").wait().get()
# do something with task_detail
Expand Down
2 changes: 1 addition & 1 deletion sample/python/pi_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def main():
# 注册自定义动作
Toolkit.register_pi_custom_action("MyAction", MyAction())
Toolkit.register_pi_custom_action("MyAct", MyAction())

# 启动 MaaPiCli
Toolkit.run_pi_cli("C:/MaaXXX/resource", "C:/MaaXXX/cache", False)
Expand Down

0 comments on commit dddf04e

Please sign in to comment.