summaryrefslogtreecommitdiffstats
path: root/app/api/Binding.qml
diff options
context:
space:
mode:
authorYordan Dimitrov <y.dimitrov.14@gmail.com>2018-06-04 17:29:50 +0300
committerHarunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>2018-06-13 22:46:21 +0900
commit7b864d8e52606ce71436e697f2f592472ddc5465 (patch)
tree7e77e031525b77593ba87b87095309ce35b47941 /app/api/Binding.qml
parentdd747fa9dfc009da9113e310d9b40f6280e7a57a (diff)
Changing LED colour gradient according to temperature sliders
v1 - the colour of the LED reflects the temperature of both sliders at the same time - colour gradient starts from blue and ends with red: for low and high temperatures, respectively. v2 - removed all A/C code - paths are read from a predefined variables Change-Id: I989d6779c0a72b9def74bc9bcf41ae01d368ba8a Signed-off-by: Yordan Dimitrov <y.dimitrov.14@gmail.com>
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 25388df..7d996ee 100644
--- a/app/api/Binding.qml
+++ b/app/api/Binding.qml
@@ -29,6 +29,7 @@ WebSocket {
property real rightTemperature: 21.0
property string language: "en_US"
+
property Connections c : Connections {
target: root
onFanSpeedChanged: {
@@ -40,11 +41,20 @@ WebSocket {
var json = [MessageId.call, '9999', 'hvac/set', {'LeftTemperature': leftTemperature}]
console.debug(JSON.stringify(json))
sendTextMessage(JSON.stringify(json))
+
+ var json1 = [MessageId.call, '9999', 'hvac/temp_left_zone_led', {'LeftLed': leftTemperature}]
+ console.debug(JSON.stringify(json1))
+ sendTextMessage(JSON.stringify(json1))
+
}
onRightTemperatureChanged: {
var json = [MessageId.call, '9999', 'hvac/set', {'RightTemperature': rightTemperature}]
console.debug(JSON.stringify(json))
sendTextMessage(JSON.stringify(json))
+
+ var json1 = [MessageId.call, '9999', 'hvac/temp_right_zone_led', {'RightLed': rightTemperature}]
+ console.debug(JSON.stringify(json1))
+ sendTextMessage(JSON.stringify(json1))
}
onLanguageChanged: {
var json = [MessageId.call, '9999', 'hvac/set', {'Language': language}]