summaryrefslogtreecommitdiff
path: root/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml')
-rw-r--r--src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml64
1 files changed, 4 insertions, 60 deletions
diff --git a/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml b/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
index 8158b3271e..8a426197e2 100644
--- a/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
+++ b/src/components/qt_hmi/qml_model_qt5/hmi_api/VR.qml
@@ -34,6 +34,7 @@
import QtQuick 2.0
import "Common.js" as Common
+
Item {
function isReady() {
console.log("Message Received - {method: 'VR.IsReady'}")
@@ -42,7 +43,7 @@ Item {
}
}
- function addCommand(cmdID, vrCommands, type, grammarID, appID) {
+ function addCommand(cmdID, vrCommands, appID) {
var vrCommandsLog = "";
if (vrCommands) {
for (var i = 0; i < vrCommands.length; i++) {
@@ -52,29 +53,14 @@ Item {
console.log("Message Received - {method: 'VR.AddCommand', params:{ " +
"vrCommands: [" + vrCommandsLog + "], " +
"cmdID: " + cmdID + ", " +
- "appID: " + appID + ", " +
- "type: " + type + ", " +
- "grammarID: " + grammarID +
+ "appID: " + appID +
"}}")
for (var i = 0; i < vrCommands.length; ++i) {
- if (type === Common.VRCommandType.Command) {
- dataContainer.vrCommands.append({
+ dataContainer.vrCommands.append({
cmdID: cmdID,
command: vrCommands[i],
appID: appID === undefined ? 0 : appID,
- type: type,
- grammarID: grammarID,
});
- }
- else {
- dataContainer.choicesVrCommands.append({
- cmdID: cmdID,
- command: vrCommands[i],
- appID: appID === undefined ? 0 : appID,
- type: type,
- grammarID: grammarID,
- });
- }
}
console.log("exit")
}
@@ -125,46 +111,4 @@ Item {
dataContainer.changeRegistrationTTSVR(language, appID);
console.debug("exit");
}
- function ttsChunksToString(ttsChunks){
- return ttsChunks.map(function(str) { return str.text }).join('\n')
- }
- function performInteraction(helpPrompt, initialPrompt, timeoutPrompt, timeout, grammarID) {
- console.debug("enter");
- var helpttsChunksLog = "",
- initialttsChunkLog = "",
- timeoutttsChunkLog = "",
- grammarIDLog ="";
-
- if (helpPrompt) {
- for (var i = 0; i < helpPrompt.length; i++) {
- helpttsChunksLog += "{type: " + helpPrompt[i].type + ", " +
- "text: '" + helpPrompt[i].text + "'}, ";
- }
- }
- if (initialPrompt) {
- for (var i = 0; i < initialPrompt.length; i++) {
- initialttsChunkLog += "{type: " + initialPrompt[i].type + ", " +
- "text: '" + initialPrompt[i].text + "'}, ";
- }
- }
- if (timeoutPrompt) {
- for (var i = 0; i < timeoutPrompt.length; i++) {
- timeoutttsChunkLog += "{type: " + timeoutPrompt[i].type + ", " +
- "text: '" + timeoutPrompt[i].text + "'}, ";
- }
- }
- console.log("Message Received - {method: 'TTS.PerformInteraction', params:{ " +
- "helpPrompt: [" + helpttsChunksLog + "], " +
- "initialPrompt: [" + initialttsChunkLog + "], " +
- "timeoutPrompt: [" + timeoutttsChunkLog + "], " +
- "timeout: " + timeout +
- "}}")
-
- ttsPopUp.performInteraction(ttsChunksToString(helpPrompt),
- ttsChunksToString(initialPrompt),
- ttsChunksToString(timeoutPrompt),
- timeout)
- interactionPopup.grammarID = grammarID
- console.debug("exit");
- }
}