MistEO
2022-08-27 23:10:03 +08:00
parent 41f67244c6
commit 5e82c3beaa
10 changed files with 22 additions and 2 deletions

View File

@@ -87,6 +87,8 @@ Todo
Disconnected (adb/emulator crashed), and reconnected successfully
- `Disconnect`
Disconnected (adb/emulator crashed), and failed to reconnect
- `ScreencapFailed`
Screencap Failed (adb/emulator crashed), and failed to reconnect
#### AllTasksCompleted

View File

@@ -87,6 +87,8 @@ Todo
连接断开adb / 模拟器 炸了),重连成功
- `Disconnect`
连接断开adb / 模拟器 炸了),并重试失败
- `ScreencapFailed`
截图失败adb / 模拟器 炸了),并重试失败
#### AllTasksCompleted

View File

@@ -1178,7 +1178,14 @@ cv::Mat asst::Controller::get_image(bool raw)
break;
}
}
if (!success) {
if (!success && !need_exit()) {
Log.error(__FUNCTION__, "screencap failed!");
json::value info = json::object { { "uuid", m_uuid },
{ "what", "ScreencapFailed" },
{ "why", "ScreencapFailed" },
{ "details", json::object {} } };
m_callback(AsstMsg::ConnectionInfo, info, m_callback_arg);
const static cv::Size d_size(m_scale_size.first, m_scale_size.second);
m_cache_image = cv::Mat(d_size, CV_8UC3);
}

View File

@@ -336,6 +336,10 @@ namespace MeoAsstGui
mainModel.AddLog(Localization.GetString("ReconnectFailed"), LogColor.Error);
AsstStop();
break;
case "ScreencapFailed":
mainModel.AddLog(Localization.GetString("ScreencapFailed"), LogColor.Error);
break;
}
}

View File

@@ -293,6 +293,7 @@
<system:String x:Key="TryToReconnect">Emulator disconnected, trying to reconnect</system:String>
<system:String x:Key="ReconnectSuccess">Reconnect succeeded. Continue the task</system:String>
<system:String x:Key="ReconnectFailed">Reconnect failed. The connection is down!</system:String>
<system:String x:Key="ScreencapFailed">Screencap failed. If it happens repeatedly, try restarting or changing the emulator.</system:String>
<system:String x:Key="IdentifyTheMistakes">Identify error</system:String>
<system:String x:Key="TaskError" xml:space="preserve">Task error: </system:String>
<system:String x:Key="CombatError">Combat error</system:String>

View File

@@ -293,6 +293,7 @@
<system:String x:Key="TryToReconnect">エミュレータが切断されました。再接続しようとしています</system:String>
<system:String x:Key="ReconnectSuccess">再接続に成功した。タスクを続行します</system:String>
<system:String x:Key="ReconnectFailed">再接続に失敗した。切断されました!</system:String>
<system:String x:Key="ScreencapFailed">スクリーン キャプチャに失敗しました。 繰り返し発生する場合は、エミュレータの再起動または変更をお試しください</system:String>
<system:String x:Key="IdentifyTheMistakes">認識エラー</system:String>
<system:String x:Key="TaskError">タスクエラー:</system:String>
<system:String x:Key="CombatError">戦闘エラー</system:String>

View File

@@ -293,6 +293,7 @@
<system:String x:Key="TryToReconnect">에뮬레이터가 연결 해제되었습니다. 다시 연결하려고 합니다.</system:String>
<system:String x:Key="ReconnectSuccess">다시 연결되었습니다. 작업을 계속합니다.</system:String>
<system:String x:Key="ReconnectFailed">다시 연결하지 못했습니다. 연결 해제되었습니다!</system:String>
<system:String x:Key="ScreencapFailed">스크린캡이 실패했습니다. 반복적으로 발생하면 에뮬레이터를 다시 시작하거나 변경해 보세요.</system:String>
<system:String x:Key="IdentifyTheMistakes">인식 오류</system:String>
<system:String x:Key="TaskError">작업 오류:</system:String>
<system:String x:Key="CombatError">작전 오류</system:String>

View File

@@ -293,7 +293,7 @@
<system:String x:Key="TryToReconnect">🕺🍷🍷🍻🍺🍻🍻</system:String>
<system:String x:Key="ReconnectSuccess">🍻💃🍸🍷🍷</system:String>
<system:String x:Key="ReconnectFailed">🍻🍸🍻🍺🍸🕺</system:String>
<system:String x:Key="IdentifyTheMistakes">🍺🍺🍷</system:String>
<system:String x:Key="ScreencapFailed">🍷🍷🕺🍺🍻🍸🕺🍺🍷🍸💃🍻💃🍺🍷</system:String>
<system:String x:Key="TaskError">🍷🕺🍺</system:String>
<system:String x:Key="CombatError">🕺🍻💃</system:String>
<system:String x:Key="StartTask">🍷🍻🍸</system:String>

View File

@@ -293,6 +293,7 @@
<system:String x:Key="TryToReconnect">模拟器断开,正在尝试重连</system:String>
<system:String x:Key="ReconnectSuccess">重连成功,继续任务</system:String>
<system:String x:Key="ReconnectFailed">重连失败,连接断开!</system:String>
<system:String x:Key="ScreencapFailed">截图失败,如反复出现请尝试重启或更换模拟器!</system:String>
<system:String x:Key="IdentifyTheMistakes">识别错误</system:String>
<system:String x:Key="TaskError">任务出错:</system:String>
<system:String x:Key="CombatError">战斗出错</system:String>

View File

@@ -293,6 +293,7 @@
<system:String x:Key="TryToReconnect">模擬器斷開,正在嘗試重連</system:String>
<system:String x:Key="ReconnectSuccess">重連成功,繼續任務</system:String>
<system:String x:Key="ReconnectFailed">重連失敗,連接斷開!</system:String>
<system:String x:Key="ScreencapFailed">截圖失敗,如反復出現請嘗試重啟或更換模擬器!</system:String>
<system:String x:Key="IdentifyTheMistakes">辨識錯誤</system:String>
<system:String x:Key="TaskError">任務出錯:</system:String>
<system:String x:Key="CombatError">戰鬥出錯</system:String>