mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: 修复连接信息uuid为空的问题,并修复一个命名问题
This commit is contained in:
@@ -75,7 +75,7 @@ Todo
|
||||
Connection failed.
|
||||
- `Connected`
|
||||
Connected. Note that the `uuid` field is empty now (and will be retrieved in the next step)
|
||||
- `UuidGetted`
|
||||
- `UuidGot`
|
||||
UUID has been retrieved.
|
||||
- `UnsupportedResolution`
|
||||
The resolution is not supported.
|
||||
|
||||
@@ -75,7 +75,7 @@ Todo
|
||||
连接失败
|
||||
- `Connected`
|
||||
已连接,注意此时的 `uuid` 字段值为空(下一步才是获取)
|
||||
- `UuidGetted`
|
||||
- `UuidGot`
|
||||
已获取到设备唯一码
|
||||
- `UnsupportedResolution`
|
||||
分辨率不被支持
|
||||
|
||||
@@ -567,7 +567,7 @@ appendTask setTaskParams start stop等接口不再描述,均可遵循以上规
|
||||
"width": 1280,
|
||||
"height": 720
|
||||
},
|
||||
"what": "ResolutionGetted",
|
||||
"what": "ResolutionGot",
|
||||
"why": ""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -295,7 +295,9 @@ void Assistant::task_callback(AsstMsg msg, const json::value& detail, void* cust
|
||||
{
|
||||
auto p_this = static_cast<Assistant*>(custom_arg);
|
||||
json::value more_detail = detail;
|
||||
more_detail["uuid"] = p_this->m_uuid;
|
||||
if (!more_detail.contains("uuid")) {
|
||||
more_detail["uuid"] = p_this->m_uuid;
|
||||
}
|
||||
|
||||
switch (msg) {
|
||||
case AsstMsg::InternalError:
|
||||
|
||||
@@ -1001,7 +1001,7 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a
|
||||
|
||||
json::value info = get_info_json() |
|
||||
json::object{
|
||||
{ "what", "UuidGetted" },
|
||||
{ "what", "UuidGot" },
|
||||
{ "why", "" }
|
||||
};
|
||||
info["details"]["uuid"] = m_uuid;
|
||||
@@ -1061,7 +1061,7 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a
|
||||
|
||||
json::value info = get_info_json() |
|
||||
json::object{
|
||||
{ "what", "ResolutionGetted" },
|
||||
{ "what", "ResolutionGot" },
|
||||
{ "why", "" }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user