summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-01-02 10:58:34 -0500
committerScott Murray <scott.murray@konsulko.com>2020-01-03 15:51:27 +0000
commit9926c7fe070ce8635540f9f2fd9b3a365717bcee (patch)
treed1f7da9127aa19be1a1d5f94d18609a5b0646ad3
parent3ddd630bb82160be550f09aefe201f626a3ff2ac (diff)
Update navigation event names
Change set_destination/cancel_navigation to match the setDestination/cancelNavigation that alexa-voiceagent-service seems to have switched to at some point between 1.3 and 2.0. It does not seem worthwhile trying to get Amazon to change on their side, and additionally 2.1 changes the whole API so capabilities will need to be reworked again anyway. Bug-AGL: SPEC-3083 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I52c0eb78c6c3c27b8c5714092f235aa409cfcc18 (cherry picked from commit bad0a516cd461f5a5385da841858504b67ee5832)
-rw-r--r--htdocs/binding.js10
-rw-r--r--htdocs/index.html8
-rw-r--r--src/plugins/capabilities/navigation/include/NavigationMessages.h6
3 files changed, 11 insertions, 13 deletions
diff --git a/htdocs/binding.js b/htdocs/binding.js
index 9de9608..2930ec6 100644
--- a/htdocs/binding.js
+++ b/htdocs/binding.js
@@ -247,15 +247,15 @@ function showNavigationEventCHooserDialod() {
const subscribeBtn = document.getElementById('navigation-subscribe-btn');
subscribeBtn.addEventListener('click', (evt) => {
- const setDestination = document.getElementById('set_destination').checked;
- const cancelNavigation = document.getElementById('cancel_navigation').checked;
+ const setDestination = document.getElementById('setDestination').checked;
+ const cancelNavigation = document.getElementById('cancelNavigation').checked;
const query = {"actions":[]};
if (setDestination)
- query.actions.push('set_destination');
+ query.actions.push('setDestination');
if (cancelNavigation)
- query.actions.push('cancel_navigation');
+ query.actions.push('cancelNavigation');
callbinder(afbVshlCapabilities.url, 'vshl-capabilities', 'navigation/subscribe', query);
modal.close();
@@ -273,4 +273,4 @@ function triggerButtonPressedAction(button) {
}
}
callbinder(afbVshlCapabilities.url, 'vshl-capabilities', 'playbackcontroller/publish', paramsJson);
-} \ No newline at end of file
+}
diff --git a/htdocs/index.html b/htdocs/index.html
index f322881..eeb86ef 100644
--- a/htdocs/index.html
+++ b/htdocs/index.html
@@ -102,12 +102,12 @@
<div>
<ol>
<li>
- <input type="checkbox" id="set_destination" checked>
- <label>set_destination</label>
+ <input type="checkbox" id="setDestination" checked>
+ <label>setDestination</label>
</li>
<li>
- <input type="checkbox" id="cancel_navigation" checked>
- <label>cancel_navigation</label>
+ <input type="checkbox" id="cancelNavigation" checked>
+ <label>cancelNavigation</label>
</li>
</ol>
</div>
diff --git a/src/plugins/capabilities/navigation/include/NavigationMessages.h b/src/plugins/capabilities/navigation/include/NavigationMessages.h
index 00c0c65..646e1f1 100644
--- a/src/plugins/capabilities/navigation/include/NavigationMessages.h
+++ b/src/plugins/capabilities/navigation/include/NavigationMessages.h
@@ -31,10 +31,8 @@ static string NAME = "navigation";
* Supported actions from VA -> APPS
******************************************************************************************************
*/
-static string NAVIGATION_SET_DESTINATION = "set_destination";
-static string NAVIGATION_CANCEL = "cancel_navigation";
-
-// Supported actions from Apps -> VA
+static string NAVIGATION_SET_DESTINATION = "setDestination";
+static string NAVIGATION_CANCEL = "cancelNavigation";
// List of actions that are delivered from VA -> Apps
static list<string> NAVIGATION_UPSTREAM_ACTIONS = {