diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-14 14:24:31 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-14 14:24:31 +0900 |
commit | c38d55fc0b43215f63c873e7578554f5942e69b3 (patch) | |
tree | 976b6db61a9347a98862617d81cc3849e6521fc1 /homescreen/src/homescreenvoice.cpp | |
parent | e3767af1a9d44abe2ea88ba85ff004cbdaefc21c (diff) |
add vui display
Diffstat (limited to 'homescreen/src/homescreenvoice.cpp')
-rw-r--r-- | homescreen/src/homescreenvoice.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/homescreen/src/homescreenvoice.cpp b/homescreen/src/homescreenvoice.cpp index 4a376e1..f56625e 100644 --- a/homescreen/src/homescreenvoice.cpp +++ b/homescreen/src/homescreenvoice.cpp @@ -206,17 +206,19 @@ void HomescreenVoice::on_event(void *closure, const char *event, struct afb_wsj1 return; } - const char* corestatus = json_object_get_string(json_state); + const char* info = json_object_get_string(json_state); - if (strcasecmp(corestatus, HomescreenVoice::state_lists[0].c_str()) == 0) { + if (strcasecmp(info, HomescreenVoice::state_lists[0].c_str()) == 0) { emit statusChanged(true); } - else if ((strcasecmp(corestatus, HomescreenVoice::state_lists[1].c_str()) == 0)|| - (strcasecmp(corestatus, HomescreenVoice::state_lists[2].c_str()) == 0)|| - (strcasecmp(corestatus, HomescreenVoice::state_lists[3].c_str()) == 0)|| - (strcasecmp(corestatus, HomescreenVoice::state_lists[4].c_str()) == 0)){ + else if ((strcasecmp(info, HomescreenVoice::state_lists[1].c_str()) == 0)|| + (strcasecmp(info, HomescreenVoice::state_lists[2].c_str()) == 0)|| + (strcasecmp(info, HomescreenVoice::state_lists[3].c_str()) == 0)|| + (strcasecmp(info, HomescreenVoice::state_lists[4].c_str()) == 0)){ emit statusChanged(false); } + + emit showInformation(QString(QLatin1String(info))); } /** |