Skip to content

Commit

Permalink
feat: py binding context.run_action 添加 box 默认值
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Sep 23, 2024
1 parent 1caed5a commit ee1b5f6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions source/binding/Python/maa/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,21 @@ def run_recognition(
def run_action(
self,
entry: str,
box: RectType,
box: RectType = (0, 0, 0, 0),
reco_detail: str = "",
pipeline_override: Dict = {},
) -> Optional[NodeDetail]:
rect = RectBuffer()
rect.set(box)

node_id = int(Library.framework.MaaContextRunAction(
self._handle,
*Context._gen_post_param(entry, pipeline_override),
rect._handle,
reco_detail.encode()
))
node_id = int(
Library.framework.MaaContextRunAction(
self._handle,
*Context._gen_post_param(entry, pipeline_override),
rect._handle,
reco_detail.encode()
)
)

if not node_id:
return None
Expand Down

0 comments on commit ee1b5f6

Please sign in to comment.