mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
fix: 修复理智药插件中变量名错误;调整文档中理智药相关说明 (#7147)
fix: 修复理智药插件中变量名错误;调整文档中理智药相关说明
This commit is contained in:
@@ -124,11 +124,11 @@ std::optional<asst::MedicineCounterPlugin::InitialMedicineResult> asst::Medicine
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
RegionOCRer inventry_ocr(image);
|
||||
inventry_ocr.set_task_info(inventory_task);
|
||||
inventry_ocr.set_bin_threshold(inventory_task->special_params[0], inventory_task->special_params[1]);
|
||||
inventry_ocr.set_roi(inventory_rect);
|
||||
if (!inventry_ocr.analyze()) {
|
||||
RegionOCRer inventory_ocr(image);
|
||||
inventory_ocr.set_task_info(inventory_task);
|
||||
inventory_ocr.set_bin_threshold(inventory_task->special_params[0], inventory_task->special_params[1]);
|
||||
inventory_ocr.set_roi(inventory_rect);
|
||||
if (!inventory_ocr.analyze()) {
|
||||
Log.error(__FUNCTION__, "medicine using count analyze failed");
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -148,9 +148,9 @@ std::optional<asst::MedicineCounterPlugin::InitialMedicineResult> asst::Medicine
|
||||
|
||||
int using_count = 0, inventory_count = 0;
|
||||
if (!utils::chars_to_number(using_count_ocr.get_result().text, using_count) ||
|
||||
!utils::chars_to_number(inventry_ocr.get_result().text, inventory_count)) {
|
||||
!utils::chars_to_number(inventory_ocr.get_result().text, inventory_count)) {
|
||||
Log.error(__FUNCTION__, "unable to convert ocr result to int, use:", using_count_ocr.get_result().text,
|
||||
", inventory:", inventry_ocr.get_result().text);
|
||||
", inventory:", inventory_ocr.get_result().text);
|
||||
return std::nullopt;
|
||||
}
|
||||
use += using_count;
|
||||
|
||||
Reference in New Issue
Block a user