Commit Graph

2324 Commits

Author SHA1 Message Date
Evoltsuki
d7250628e1 feat: 新增沙盘推演作业支持 (#16578)
新增沙盘推演相关配置字段与识别逻辑,添加沙盘选项弹窗、确认等任务配置,支持设置两个沙盘选项参数,适配单多编队作业的沙盘模式调用
2026-06-05 16:36:49 +08:00
Status102
bba3f3281a rft: 基于灰度阈值预处理的自动战斗导航, 适配H关及怪猎2期 (#16990)
* rft: 基于灰度阈值的自动战斗导航, 适配H关及怪猎2期

* perf: 清理

* fix: replace

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: loule

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-04 09:54:16 +08:00
Status102
4843310bec feat: 悖论模拟支持跳过战斗失败的作业, 自动战斗作业增加对应结构 (#16985)
feat: 悖论模拟支持跳过战斗失败的作业
2026-06-04 09:53:56 +08:00
Aliothmoon
77612daaeb fix: MaskedCcoeffMatcher 稀疏路径累加器改用 CV_64F 防止大数相减精度损失 (#16983) 2026-06-04 00:54:19 +08:00
github-actions[bot]
c5d4ceb7e4 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26784708703
[skip changelog]
2026-06-01 22:03:47 +00:00
status102
e7151cdf8d rft: 悖论模拟作业列表变量名与实际不符 2026-06-01 17:40:14 +08:00
momomochi987
9237dddda4 feat: AccountSwitchTask 支援繁中服客戶端
- 在 _run/select_account 將 txwy 視為與 Official 同類,套用 char model OCR
- navigate_to_start_page 認得 AccountManagerTxwy 作為登入頁入口
- SupportedClientType 將 txwy 從註解移到實際列表
2026-06-01 17:08:26 +08:00
github-actions[bot]
4496d5c9da chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26695211011
[skip changelog]
2026-05-30 21:21:39 +00:00
uye
a10391e9d4 perf: 优化信用商店复核逻辑 (#16932)
* perf: 优化信用商店复核逻辑

* chore: 增加对 OCR 结果为空的处理
2026-05-30 17:12:59 +08:00
github-actions[bot]
5f1869ab46 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26663324632
[skip changelog]
2026-05-29 21:35:11 +00:00
Rin
4b520aaac9 fix: 修复宿舍自定义干员+信赖补位的bug&外服同步修复&提升代码可读性 (#16659)
* fix: 修复宿舍自定义干员+信赖补位的bug

* chore: EN

* fix: 补充宿舍筛选全部按钮的日韩识别文本

补充日服“全て”和韩服“전부”,用于取消宿舍“未进驻”筛选时点击“全部”选项。

* refactor: improve infrast dorm task readability

---------

Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: Roland125 <oroland125@outlook.com>
2026-05-30 00:56:57 +08:00
Loong
b2fa9a1c3e fix: 显式声明 adb-lite client 对应的 serial (#16853)
## 概述

- 在 `AdbController::connect` 确定目标 address/serial 后,通过
`PlatformIO::set_adb_serial` 显式声明当前 adb 设备。
- NativeIO 默认忽略该调用;AdbLiteIO 使用该 serial 初始化或切换内部 adb-lite client。
- adb-lite 的 `shell`、`exec-out`、`push` 和交互式 shell 只使用已声明的
client,不再从命令路径里隐式初始化 client。
- AdbLiteIO 内部集中校验 client/serial,并用 mutex 覆盖 `m_adb_client` /
`m_adb_serial` 以及对 adb-lite client 的调用,避免 `call_command` 与
`interactive_shell` 并发访问同一状态。

## 背景

#16850 已修复 `adb connect` 被跳过后 adb-lite client 未初始化的问题,并补充了内部锁保护。这个 PR
是后续调整:把 client 初始化入口从命令执行路径挪到连接生命周期中,让状态声明更明确。

## 修复方式

连接阶段已经知道当前 address/serial,所以在设置 connect/release 命令后调用:

```cpp
m_platform_io->set_adb_serial(address);
```

对 NativeIO 来说这是 no-op;对 AdbLiteIO 来说,这是初始化或切换 `adb::client` 的入口。

后续 adb-lite 命令路径通过 `lock_adb_client(serial)` 统一校验命令中的 `-s <serial>` 与当前
client 对应的 serial 一致,并在同一把锁仍然持有时调用 adb-lite client。这样避免在
`interactive_shell` 中隐式写入 client/serial 状态,也避免把 `m_adb_client` 暴露给无锁调用。

`set_adb_serial` 也改为先创建临时 `adb::client`,创建成功后再提交 `m_adb_serial` /
`m_adb_client` 状态;如果创建失败则记录错误并清空 adb-lite client 状态,避免 serial 已切换但
client 仍指向旧对象的不一致状态。

## 验证

- `git diff --check --cached`
- `cmake --build /private/tmp/maa-build-8599-core --parallel 8`
- `cmake --install /private/tmp/maa-build-8599-core --config
RelWithDebInfo`
- 本机 `maa` CLI + Android 35 arm64 AVD:
  - `maa run connect-only -p adb-lite-test --no-summary -vvv`
  - 日志显示 `Loading MaaCore from: /private/tmp/maa-test-data-8599/lib`
  - 日志显示 `Setting adb lite enabled to true`
  - 日志到达 `Connected`
  - 日志到达 `FastestWayToScreencap Encode`
  - 未出现 `adb client not initialized`
  - 未出现 `failed to create adb-lite client`
  - 未出现 `fallback to NativeIO`
2026-05-29 00:46:30 +08:00
status102
9c91b666cb fix: 避免多次correct_rect后返回全图rect 2026-05-27 12:58:08 +08:00
status102
7a33b92d58 fix: 避免多次correct_rect后返回全图rect 2026-05-27 12:46:58 +08:00
status102
b48c640119 fix: LogWarn 等宏在 Release 下依旧输出scope导致额外间隔 2026-05-27 12:46:57 +08:00
uye
0289fa0381 feat: 公招保留指定词条 (#16586)
* feat: 保留指定词条

* chore: wpf 不再传递 skip_robot

* rft: 提取共用方法

* perf: 传参

* rft: 统一使用 PreserveTags

* fix: NameOrTaskType

---------

Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2026-05-27 00:46:02 +08:00
Alex Gu
45aefd30d7 fix: filenum_ctrl SIGABRT (#16233) + PosixIO fork _exit + CI action SHA pin (#16502)
* fix: PosixIO::call_command 中 fork 后 child 缺少 _exit 导致 unwind 进 parent 代码

当 execlp 失败时,child 分支走 `return std::nullopt`,该子进程会从
PosixIO::call_command 一路 unwind 回 AdbController::call_command 及其
caller,跟 parent 同时跑:

- 在 child 地址空间副本中释放 m_callcmd_mutex(caller 处持有的 unique_lock)
- 后续命中 `kill(m_child, SIGTERM)` 时 child 视角 m_child==0
  → POSIX `kill(0, SIG)` 给整个进程组发信号 → 把 parent 一并杀掉
- 析构时双 close 同一 fd 号(kernel 已重用给别处)→ 关掉 parent 的
  socket / log fd → 后续 read/write 错乱

查看 git 历史发现回归引入于 #7748(perf: update PosixIO::call_command, 2023-12)。
当时 perf 重构把 child 分支结尾的 `::exit(exit_ret)` 替换成
`Log.error(...) + return std::nullopt`。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: 将第三方 action 钉到 commit SHA,符合 GitHub 安全建议

https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: filenum_ctrl 中 std::filesystem 调用缺 error_code 导致 SIGABRT

Windows 上 debug 截图被另一进程占用时,std::filesystem 多个调用会抛 filesystem_error。
异常未被 filenum_ctrl / save_debug_image / AbstractTask::run 任一层
捕获,沿任务栈一路冒到 MaaCore 顶层(issue #16233)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: 清理 PosixIO 子分支 execlp 死赋值

按 Sourcery review 清掉死代码。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: restore release package workflow

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 22:20:33 +08:00
status102
81b71409a8 Revert "fix: 任务匹配进入onErrorNext时, cur_task_ptr错误置空"
This reverts commit c27cefa307.
2026-05-25 18:33:37 +08:00
status102
c27cefa307 fix: 任务匹配进入onErrorNext时, cur_task_ptr错误置空 2026-05-25 18:21:17 +08:00
github-actions[bot]
6a286f05a3 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26373021279
[skip changelog]
2026-05-24 21:19:51 +00:00
uye
ab7e4f5a4f fix: Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-25 04:02:24 +08:00
Loong
975981c568 fix: 修复 adb-lite 跳过 adb connect 后未初始化 client (#16850)
## 概述

- 在 adb-lite 处理 `shell`、`exec-out`、`push` 和交互式 shell 命令时,从 `-s <serial>`
参数懒初始化 adb-lite client。
- `adb connect <address>` 路径继续使用同一个 client 获取逻辑。
- 记录当前 adb-lite serial,在切换设备时重新创建 client。

## 问题原因

#15300 之后,`AdbController::connect` 会先检查 `adb devices`。如果目标设备已经在列表中,例如
`emulator-5554 device`,就会跳过 `adb connect <serial>`。

这个行为对普通 adb 路径是合理的,但 adb-lite 之前只在 `adb connect` 分支里初始化
`m_adb_client`。因此当设备已经在线、`adb connect` 被跳过时,后续的 `adb -s emulator-5554
shell ...` 会进入 adb-lite 路径,但此时 client 尚未初始化,日志中会出现:

```text
adb client not initialized
fallback to NativeIO
```

## 修复方式

把 adb-lite client 的初始化从 `adb connect` 分支中解耦出来。只要 adb-lite 收到带有 `-s
<serial>` 的 `shell`、`exec-out`、`push` 或交互式 shell 命令,就根据该 serial 获取或创建对应的
`adb::client`。

这样保留了 #15300 中“设备已在线时跳过 `adb connect`”的行为,同时也保证 adb-lite 不再依赖 `adb
connect` 作为唯一初始化入口。

## 验证

- 使用本机已安装的 maa-cli, MaaCore v6.10.6 和 Android 35 arm64 AVD 复现:
  - `adb devices` 返回 `emulator-5554 device`
  - 日志出现 `adb client not initialized`
  - 随后出现 `fallback to NativeIO`
- 编译并安装修复后的 Core:
  - 日志显示 `Setting adb lite enabled to true`
  - 日志到达 `Connected`
  - 日志到达 `FastestWayToScreencap Encode`
  - 未再出现 `adb client not initialized`
  - 未再出现 `fallback to NativeIO`

## Summary by Sourcery

确保 adb-lite 为每个设备序列号初始化并复用一个客户端,用于 shell、exec-out、push 和交互式 shell 命令,并且与
adb connect 的执行路径无关。

Bug 修复:
- 当已在线设备跳过 adb connect 时,防止 adb-lite 因客户端未初始化而失败。

增强功能:
- 追踪当前的 adb-lite 设备序列号,并在序列号变化时重新创建 adb 客户端,以支持多设备会话。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Ensure adb-lite initializes and reuses a client per device serial for
shell, exec-out, push, and interactive shell commands, independent of
the adb connect path.

Bug Fixes:
- Prevent adb-lite from failing with an uninitialized client when adb
connect is skipped for already-online devices.

Enhancements:
- Track the current adb-lite device serial and recreate the adb client
when the serial changes to support multiple device sessions.

</details>
2026-05-25 03:50:35 +08:00
uye
cc09e5b216 fix: 傀影肉鸽烧水后无法前往指定难度
fix #16843
2026-05-24 20:54:52 +08:00
status102
9c49148d72 fix: RegionOCR use_raw = false时bounding_rect的扩展失效 2026-05-24 16:47:56 +08:00
Rin
60104dbd89 fix: 基建制造站切换产物流程稳定性提升 (#16747)
* fix: 基建制造站切换产物流程稳定性提升

* fix: 切换产物失败时向 GUI/Log报错

* refactor: 换产物失败后仍进入换人步骤,不停止任务链

*fix: 拆分自定义/params 无人机使用变量

* fix: 补充缺失产物任务配置的空指针保护。

---------

Co-authored-by: Roland125 <oroland125@outlook.com>
2026-05-24 05:41:11 +08:00
Loong
48424a68c5 fix: refactor ADB connection logic to only connect when needed (#15300)
优化 ADB 连接处理逻辑,避免不必要的连接尝试,并在连接不需要或无效时改进错误报告。
2026-05-23 16:24:49 +01:00
github-actions[bot]
c56bb31e19 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26312714696
[skip changelog]
2026-05-22 21:26:42 +00:00
uye
e4ab103f96 fix: 修复未开启线索交流时不计算会客室效率 2026-05-22 23:43:54 +08:00
Aliothmoon
3db262c5ca fix: 移除dft路径下的缓存 & 补充缓存驱逐机制 (#16800)
* fix: 移除dft路径下的缓存

* feat: 使用LRU控制一下缓存上限

* fix: potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* feat: 驱逐缓存项时打印日志

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-22 22:52:50 +08:00
萨拉托加
4f094c68c9 feat: RA-4 (#16749)
* feat: RA-4

* fix: 修复一些问题

* fix: 继续优化改进

* fix: 继续优化改进

* feat: 添加 RA-4 入口与文档

* perf: 提取 baseTask

* chore: 调整描述

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-05-22 22:23:59 +08:00
status102
fe2bae6093 fix: SS复刻任务导航超时临时修复
等待重构拆分
2026-05-22 18:48:12 +08:00
status102
ad0295c83e fix: OF-1战斗失败错误结束
- link to #16748
2026-05-20 12:28:34 +08:00
github-actions[bot]
87d64af26f chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26061417579
[skip changelog]
2026-05-18 21:27:58 +00:00
Roland125
9475e2f76a fix: 剿灭掉落识别不到合成玉时不停止任务 (#16726) 2026-05-19 01:38:40 +08:00
uye
b20a05f2ea fix: review 2026-05-18 12:54:01 +08:00
Status102
ac3b826c55 rft: RA mode (#16697)
## Summary by Sourcery

围绕共享的 `ReclamationMode` 枚举统一回收任务模式处理方式,并相应更新 UI 和配置流程。

New Features:
- 引入共享的 `ReclamationMode` 枚举,在各类回收主题和任务中统一用于表示算法模式。

Bug Fixes:
- 确保 `RelaunchAnchor` 模式选择在使用新的基于位标志(bitflag)的模式值时,仍能正确映射到 `RA-1` 和
`RA-15`,并保持已序列化配置中的现有行为不变。

Enhancements:
- 更新回收设置视图模型,使其暴露统一的模式列表;该列表会根据当前选中的主题动态重建,同时在可能的情况下保留当前选择。
- 调整 `ReclamationTask` 及相关配置类,使用新的 `ReclamationMode` 枚举来替代原先按主题划分的整型模式值。
- 在主题或底层任务数据变更时刷新回收模式选项,以保持 UI 与模型的同步。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Unify reclamation task mode handling around a shared ReclamationMode
enum and update UI and config flows accordingly.

New Features:
- Introduce a shared ReclamationMode enum used across reclamation themes
and tasks to represent algorithm modes.

Bug Fixes:
- Ensure RelaunchAnchor mode selection correctly maps to RA-1 and RA-15
using the new bitflag-based mode values while maintaining existing
behavior in serialized configs.

Enhancements:
- Update reclamation settings view model to expose a unified mode list
that is dynamically rebuilt based on the selected theme while preserving
the current selection where possible.
- Adjust ReclamationTask and related config classes to use the new
ReclamationMode enum instead of theme-specific integer modes.
- Refresh reclamation mode options whenever the theme or underlying task
data changes to keep the UI and model in sync.

</details>

增强内容:
- 将原本分别使用整数和主题特定表示的回收模式,统一替换为在任务配置和视图模型中通用的 `ReclamationMode` 枚举。
- 更新回收设置的 UI,使其根据所选主题动态生成模式列表,并在主题变化时保持已选模式同步。
- 调整配置转换和任务序列化逻辑,使其使用新的枚举来读写回收模式,同时保持现有行为不变。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

围绕共享的 `ReclamationMode` 枚举统一回收任务模式处理方式,并相应更新 UI 和配置流程。

New Features:
- 引入共享的 `ReclamationMode` 枚举,在各类回收主题和任务中统一用于表示算法模式。

Bug Fixes:
- 确保 `RelaunchAnchor` 模式选择在使用新的基于位标志(bitflag)的模式值时,仍能正确映射到 `RA-1` 和
`RA-15`,并保持已序列化配置中的现有行为不变。

Enhancements:
- 更新回收设置视图模型,使其暴露统一的模式列表;该列表会根据当前选中的主题动态重建,同时在可能的情况下保留当前选择。
- 调整 `ReclamationTask` 及相关配置类,使用新的 `ReclamationMode` 枚举来替代原先按主题划分的整型模式值。
- 在主题或底层任务数据变更时刷新回收模式选项,以保持 UI 与模型的同步。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Unify reclamation task mode handling around a shared ReclamationMode
enum and update UI and config flows accordingly.

New Features:
- Introduce a shared ReclamationMode enum used across reclamation themes
and tasks to represent algorithm modes.

Bug Fixes:
- Ensure RelaunchAnchor mode selection correctly maps to RA-1 and RA-15
using the new bitflag-based mode values while maintaining existing
behavior in serialized configs.

Enhancements:
- Update reclamation settings view model to expose a unified mode list
that is dynamically rebuilt based on the selected theme while preserving
the current selection where possible.
- Adjust ReclamationTask and related config classes to use the new
ReclamationMode enum instead of theme-specific integer modes.
- Refresh reclamation mode options whenever the theme or underlying task
data changes to keep the UI and model in sync.

</details>

</details>
2026-05-18 11:42:29 +08:00
github-actions[bot]
629cb81c64 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26002960944
[skip changelog]
2026-05-17 21:18:14 +00:00
uye
4805557242 FIX: 特意删的 PNS 怎么又给加回来了 2026-05-18 03:08:03 +08:00
uye
3ca37f8f1c fix: build warning 2026-05-18 02:53:04 +08:00
uye
1c0440436a rft: 生息演算策略逻辑修改 (#16680)
* rft: 生息演算策略逻辑修改

* chroe: review

* feat: 支持禁用高级设置

* chore: Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-18 02:34:38 +08:00
Michael Liu 刘嘉远
31805c16ef feat: 生稀盐酸-重启锚点 添加 RA15 支持 (#16667)
* feat: 新增生息演算「重启锚点」RA-15 关卡任务链

* feat: 生息演算 RA-1/RA-15 关卡选择 UI 及 Core 适配

新增 RelaunchAnchorStage 枚举,WPF 界面添加关卡选择下拉框,
C++ Core 根据 stage 参数加载对应的任务链入口。

* feat: 添加RA-15自己有初雪的版本

* fix: Delete resource/tasks/RA/Reclamation3-RA15-HaveCX.json

* fix: 增加识别已有初雪功能

* feat: 拆分 RA-1/RA-15 教程文本,根据关卡选择切换提示

* rft: 合并生稀盐酸文件,并抽取相同任务

* fix: MaaCore 为新盐酸修改为通用性入口

* fix: 生稀盐酸 wpfgui 提示文本选取逻辑优化

* chore: 修改生稀盐酸入口任务命名

* chore: 优化生稀盐酸提示文本

* fix: 重启锚点不再 fallback 关卡

* chore: 生稀盐酸目录结构优化

* chore: 移除旧任务入口

* fix: 修正提示描述

* chore: 优化key命名及选取逻辑

* chore: 修正翻译缩进

---------

Co-Authored-By: Michael Liu 刘嘉远 <walkerljy@163.com>
Co-authored-by: 晓丶梦丶仁 <74444214+Daydreamer114@users.noreply.github.com>
Co-authored-by: SherkeyXD <57581480+SherkeyXD@users.noreply.github.com>
2026-05-17 23:18:30 +08:00
Aliothmoon
48d51fe310 fix: 修复 FFT 路径 masked TM_CCOEFF_NORMED 精度损失导致的误匹配 (#16652)
* fix: 修复 FFT 路径 masked TM_CCOEFF_NORMED 精度损失导致的误匹配

* fix: 修一下review问题
2026-05-17 05:53:54 +08:00
github-actions[bot]
b42e2d244c chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/25942030629
[skip changelog]
2026-05-15 21:23:51 +00:00
uye
155f049cf6 feat: 初步支持 生息演算:重启锚点 新手刷代币与科技点策略 2026-05-15 19:42:05 +08:00
Aliothmoon
416ecca979 perf: 优化 masked TM_CCOEFF_NORMED 匹配性能 (#16593)
* perf: FFT/sparse fast path for masked TM_CCOEFF_NORMED

* perf: optimize masked ccoeff matching

* perf: tune masked ccoeff dispatcher and remove fixed overhead

- sync_cache_revision: atomic acquire/release double-check avoids
  taking the mutex on every preproc_and_match call. No-mask hot path
  no longer pays for the singleton at all (init hoisted into the
  FFT/sparse branch).

- should_fallback_to_opencv: pick whichever path is empirically
  faster instead of only catching dense-mask small-result cases:
  * result < 1000 && K < 2000: keep sparse (OpenCV setup dominates)
  * result < 12000 && K >= 500: fallback (covers GameStart 200x120/
    58x58 and 138x130/105x105 dead zones)
  * K*result < 25M: fallback (covers SmileyOnWork 880x80/20x21 and
    similar long-thin / small-template FFT-loses cases)

Windows MSVC x64 (min-of-2, n=803/1402):
  coverage: regressions 198 -> 50, mean 10.5ms -> 7.4ms (1.40x)
  perf:     regressions  86 ->  3, mean  854us ->  296us (2.90x)

Android arm64-v8a NEON (single run, n=803/1402):
  coverage: regressions   0, mean 125ms -> 80ms  (1.72x)
  perf:     regressions   1 (1.20x edge), mean 6.4ms -> 2.8ms (10.95x)

* perf(masked-matcher): merge 3-channel I² into a single FFT in σ_I² compute

σ_I²(x,y) = Σ_c [(M ⋆ I_c²) - (M ⋆ I_c)² / N]
          = Σ_c (M ⋆ I_c²)        - (1/N) Σ_c (M ⋆ I_c)²
            ↑ this term is linear in I_c², so by convolution linearity
              Σ_c (M ⋆ I_c²) = M ⋆ Σ_c I_c².

Precompute I_sq_sum = Σ_c I_c² in spatial domain and do a single
FFT + single IFFT instead of three. The second term Σ_c (M ⋆ I_c)²
still requires per-channel computation (squaring is non-linear).

Net: -2 FFTs and -2 IFFTs per match() call (15 → 11 transforms).

Validated min-of-3 runs on the 10 largest FFT-path cases per platform:
  windows: 8/10 cases -22%, 2 cases (66x41 templ) unchanged
  android: 8/10 cases -22%, 2 cases (66x41 templ) unchanged

The two unchanged cases have very small templates where FFT is not
the bottleneck (cvtColor / convertTo / split dominate). Correctness
preserved across 1800 iterations × 10 cases on both platforms.

* fix: 测试代码忘记删除了

* fix: make TemplResource::m_revision atomic

* chore: 调一下匹配参数

* feat: 在日志中标记匹配路径(优化实现 vs cv::matchTemplate)
2026-05-15 19:22:29 +08:00
uye
592826aef3 fix: 15 章之后的难度切换 2026-05-15 16:15:26 +08:00
github-actions[bot]
72234dcc93 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/25886570116
[skip changelog]
2026-05-14 21:26:59 +00:00
status102
3ee852928f fix: 理智药过期天数识别失败取消确认逻辑未生效
- link to #16548
2026-05-14 19:50:49 +08:00
status102
fc81cc3bbd fix: 临期理智药天数缺省值 2026-05-14 19:50:33 +08:00
github-actions[bot]
2ede1dd544 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/25827562446
[skip changelog]
2026-05-13 21:32:01 +00:00