fix.修复一些有的没的小bug

This commit is contained in:
MistEO
2021-12-11 03:22:02 +08:00
parent 767a667fbe
commit f6e69cc4ff
10 changed files with 15 additions and 15 deletions

View File

@@ -201,7 +201,7 @@ bool asst::InfrastAbstractTask::click_confirm_button()
return false;
}
void asst::InfrastAbstractTask::sync_swipe_of_operlist(bool reverse)
void asst::InfrastAbstractTask::swipe_of_operlist(bool reverse)
{
async_swipe_of_operlist(reverse);
await_swipe();

View File

@@ -24,7 +24,7 @@ namespace asst
virtual void swipe_to_the_left_of_operlist(); // 滑动到干员列表的最左侧
virtual void swipe_to_the_left_of_main_ui(); // 滑动基建的主界面到最左侧
virtual void swipe_to_the_right_of_main_ui(); // 滑动基建的主界面到最右侧
virtual void sync_swipe_of_operlist(bool reverse = false);
virtual void swipe_of_operlist(bool reverse = false);
virtual void async_swipe_of_operlist(bool reverse = false);
virtual void await_swipe();

View File

@@ -23,7 +23,7 @@ bool asst::InfrastControlTask::_run()
if (!enter_oper_list_page()) {
return false;
}
constexpr int retry_times = 1;
constexpr int retry_times = 3;
for (int i = 0; i <= retry_times; ++i) {
if (need_exit()) {
return false;

View File

@@ -34,7 +34,7 @@ bool asst::InfrastDormTask::_run()
swipe_to_the_left_of_operlist();
}
else {
async_swipe_of_operlist();
swipe_of_operlist();
}
int num_of_selected = 0;
@@ -89,7 +89,7 @@ bool asst::InfrastDormTask::_run()
}
}
else {
if (oper.doing != infrast::Doing::Working) {
if (oper.selected == false && oper.doing != infrast::Doing::Working) {
Ctrler.click(oper.rect);
if (++num_of_selected >= MaxNumOfOpers) {
Log.trace("num_of_selected:", num_of_selected, ", just break");
@@ -102,7 +102,7 @@ bool asst::InfrastDormTask::_run()
Log.trace("num_of_selected:", num_of_selected, ", just break");
break;
}
sync_swipe_of_operlist();
swipe_of_operlist();
}
click_confirm_button();
click_return_button();

View File

@@ -22,7 +22,7 @@ bool asst::InfrastOfficeTask::_run()
enter_facility(FacilityName, 0);
click_bottomleft_tab();
constexpr int retry_times = 1;
constexpr int retry_times = 3;
for (int i = 0; i <= retry_times; ++i) {
if (need_exit()) {
return false;

View File

@@ -31,7 +31,7 @@ bool asst::InfrastPowerTask::_run()
if (!enter_oper_list_page()) {
return false;
}
constexpr int retry_times = 1;
constexpr int retry_times = 3;
for (int i = 0; i <= retry_times; ++i) {
swipe_to_the_left_of_operlist();

View File

@@ -110,7 +110,7 @@ bool asst::InfrastProductionTask::shift_facility_list()
Ctrler.click(add_button);
sleep(add_task_ptr->rear_delay);
constexpr int retry_times = 1;
constexpr int retry_times = 3;
for (int i = 0; i <= retry_times; ++i) {
if (need_exit()) {
return false;
@@ -167,7 +167,7 @@ bool asst::InfrastProductionTask::opers_detect_with_swipe()
}
// 异步在最后会多滑动一下,耽误的时间还不如用同步
sync_swipe_of_operlist();
swipe_of_operlist();
}
if (!m_all_available_opers.empty()) {
@@ -555,7 +555,7 @@ bool asst::InfrastProductionTask::opers_choose()
}
// 因为识别完了还要点击,所以这里不能异步滑动
sync_swipe_of_operlist();
swipe_of_operlist();
}
return true;

View File

@@ -179,7 +179,7 @@ bool asst::InfrastReceptionTask::shift()
}
sleep(raw_task_ptr->rear_delay);
constexpr int retry_times = 1;
constexpr int retry_times = 3;
for (int i = 0; i <= retry_times; ++i) {
if (need_exit()) {
return false;

View File

@@ -50,8 +50,8 @@ namespace asst
log(level, std::forward<Args>(args)...);
}
const std::string m_log_filename = m_dirname + "asst.log";
const std::string m_log_bak_filename = m_dirname + "asst.bak.log";
const std::string m_log_filename = m_dirname + "\\asst.log";
const std::string m_log_bak_filename = m_dirname + "\\asst.bak.log";
private:
Logger()

View File

@@ -2,5 +2,5 @@
namespace asst
{
constexpr static const char* Version = "v2.3.1";
constexpr static const char* Version = "v2.3.2";
}