APCVSRepo / hmi_sdl_core_androidport

android HMI including sdl
BSD 3-Clause "New" or "Revised" License
2 stars 9 forks source link

手机app发送CreateInteractionChoiset执行失败 #11

Open ilikegithubcom opened 7 years ago

ilikegithubcom commented 7 years ago

可能是如下原因导致的: 当HMI设置VR.IsReady==false时,即HMI发送{"jsonrpc":"2.0","id":6,"result":{"available":false,"code":0,"method":"VR.IsReady"}}给SDL_Core。此时,当手机发送的指令CreateInteractionChoiset带VR时,指令执行失败。 做如下修改可跳过此问题:

./sdl_core/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc
@@ -116,7 +116,12 @@ void CreateInteractionChoiceSetRequest::Run() {
   uint32_t grammar_id = application_manager_.GenerateGrammarID();
   (*message_)[strings::msg_params][strings::grammar_id] = grammar_id;
   app->AddChoiceSet(choice_set_id_, (*message_)[strings::msg_params]);
-  SendVRAddCommandRequests(app);
+  HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
+  if(hmi_capabilities.is_vr_cooperating()){
+    SendVRAddCommandRequests(app);
+  }else{
+    OnAllHMIResponsesReceived();
+  }
 }
BrandonHe commented 7 years ago

@ilikegithubcom 谢谢更新,此问题在最新版本的core中有吗?

Gnagdhar commented 7 years ago

@ilikegithubcom Is application is responding to click events??