perf.优化基建停止按钮的响应速度

This commit is contained in:
MistEO
2021-11-04 22:43:35 +08:00
parent c8a563bc7b
commit 1a5dea8ff7
6 changed files with 48 additions and 1 deletions

View File

@@ -40,6 +40,9 @@ bool asst::InfrastReceptionTask::harvest_clue()
{
std::vector<std::string> tasks_vec = { "InfrastClueNew" };
while (!tasks_vec.empty()) {
if (need_exit()) {
return false;
}
ProcessTaskImageAnalyzer analyzer(ctrler.get_image(), tasks_vec);
if (!analyzer.analyze()) {
break;
@@ -121,6 +124,9 @@ bool asst::InfrastReceptionTask::proc_vacancy()
"No1", "No2", "No3", "No4", "No5", "No6", "No7" };
for (const std::string& clue : clue_suffix) {
if (need_exit()) {
return false;
}
// 先识别线索的空位
cv::Mat image = ctrler.get_image();
InfrastClueVacancyImageAnalyzer vacancy_analyzer(image);
@@ -164,6 +170,9 @@ bool asst::InfrastReceptionTask::shift()
constexpr int retry_times = 1;
for (int i = 0; i <= retry_times; ++i) {
if (need_exit()) {
return false;
}
swipe_to_the_left_of_operlist();
click_clear_button();