fix: 修复连接信息uuid为空的问题,并修复一个命名问题

This commit is contained in:
MistEO
2022-07-23 00:18:51 +08:00
parent 8b6e612f14
commit dedd186a0f
5 changed files with 8 additions and 6 deletions

View File

@@ -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.

View File

@@ -75,7 +75,7 @@ Todo
连接失败
- `Connected`
已连接,注意此时的 `uuid` 字段值为空(下一步才是获取)
- `UuidGetted`
- `UuidGot`
已获取到设备唯一码
- `UnsupportedResolution`
分辨率不被支持

View File

@@ -567,7 +567,7 @@ appendTask setTaskParams start stop等接口不再描述均可遵循以上规
"width": 1280,
"height": 720
},
"what": "ResolutionGetted",
"what": "ResolutionGot",
"why": ""
}
},

View File

@@ -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:

View File

@@ -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", "" }
};