summaryrefslogtreecommitdiffstats
path: root/app/api/Binding.qml
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-01-09 22:27:12 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2018-01-09 22:27:12 +0000
commitafee2b7f2409d0394d9254c96dd30fd4c35f73e7 (patch)
treeed6923eb414fecccd84576faa11f5e0973b900e7 /app/api/Binding.qml
parent997ff3705532f62bd5b8948b2d00ffc1fffe6b7c (diff)
parentbdc6eaee726a91301153c5e67b55f9324cacae85 (diff)
Merge "Languages changing depending on identity logged in"
Diffstat (limited to 'app/api/Binding.qml')
-rw-r--r--app/api/Binding.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/api/Binding.qml b/app/api/Binding.qml
index 93da6f4..25388df 100644
--- a/app/api/Binding.qml
+++ b/app/api/Binding.qml
@@ -27,6 +27,7 @@ WebSocket {
property real fanSpeed: 0.0
property real leftTemperature: 21.0
property real rightTemperature: 21.0
+ property string language: "en_US"
property Connections c : Connections {
target: root
@@ -45,6 +46,11 @@ WebSocket {
console.debug(JSON.stringify(json))
sendTextMessage(JSON.stringify(json))
}
+ onLanguageChanged: {
+ var json = [MessageId.call, '9999', 'hvac/set', {'Language': language}]
+ console.debug(JSON.stringify(json))
+ sendTextMessage(JSON.stringify(json))
+ }
}
onTextMessageReceived: {
@@ -62,6 +68,10 @@ WebSocket {
root.statusString = "Bad return value, binding probably not installed"
break
case MessageId.event:
+ if (json[1] == "hvac/language")
+ console.log("HVAC event received: ",json[2])
+ root.language = json[2].data
+ root.statusString = "Language changed to "+language
break
}
}