summaryrefslogtreecommitdiffstats
path: root/app/HVAC.qml
diff options
context:
space:
mode:
Diffstat (limited to 'app/HVAC.qml')
-rw-r--r--app/HVAC.qml176
1 files changed, 176 insertions, 0 deletions
diff --git a/app/HVAC.qml b/app/HVAC.qml
new file mode 100644
index 0000000..55251c7
--- /dev/null
+++ b/app/HVAC.qml
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2016 The Qt Company Ltd.
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 2.0
+import AGL.Demo.Controls 1.0
+import Translator 1.0
+import 'api' as API
+
+ApplicationWindow {
+ id: root
+
+ width: container.width * container.scale
+ height: container.height * container.scale
+
+ Translator {
+ id: translator
+ language: binding.language
+ }
+
+ API.Binding {
+ id: binding
+ url: bindingAddress
+ onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
+ onLanguageChanged: translator.language = language
+ }
+
+ Item {
+ id: container
+// anchors.centerIn: parent
+ x: 555
+ y: -465
+ width: 720
+ height: 1920
+ rotation: -90
+ scale: screenInfo.scale_factor()
+
+ ColumnLayout {
+ anchors.fill: parent
+ anchors.topMargin: width / 10
+ anchors.bottomMargin: width / 10
+
+ RowLayout {
+ Layout.fillHeight: true
+ Layout.alignment: Qt.AlignHCenter
+ Image {
+ source: './images/HMI_HVAC_Fan_Icon.svg'
+ }
+ Item {
+ width: container.width * 0.8
+ Slider {
+ id: fanSpeedSlider
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ from: 0.0
+ to: 255.0
+ stepSize: 1.0
+ onValueChanged: {
+ binding.fanSpeed = value
+ }
+ }
+ Label {
+ anchors.left: fanSpeedSlider.left
+ anchors.top: fanSpeedSlider.bottom
+ font.pixelSize: 32
+ text: translator.translate(qsTr('FAN SPEED'), translator.language)
+ }
+ }
+ }
+ RowLayout {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignHCenter
+ rotation: 90
+ spacing: 20
+ ColumnLayout {
+ Layout.fillWidth: true
+ spacing: 20
+ SeatHeatButton {
+ id: leftSeat
+ side: 'Left'
+ }
+ HeatDegree {
+ onCurrentItemChanged: {
+ console.log("Left Temp changed",degree)
+ binding.leftTemperature = degree
+ }
+ }
+ }
+ ColumnLayout {
+ Layout.fillWidth: true
+ spacing: 20
+ ToggleButton {
+ onImage: './images/HMI_HVAC_Active.svg'
+ offImage: './images/HMI_HVAC_Inactive.svg'
+ Label {
+ anchors.centerIn: parent
+ color: parent.checked ? '#00ADDC' : '#848286'
+ text: translator.translate(qsTr('A/C'), translator.language)
+ font.pixelSize: parent.height / 3
+ }
+ onCheckedChanged: {
+ console.debug('A/C', checked)
+ }
+ }
+ ToggleButton {
+ onImage: './images/HMI_HVAC_Active.svg'
+ offImage: './images/HMI_HVAC_Inactive.svg'
+ Label {
+ anchors.centerIn: parent
+ color: parent.checked ? '#00ADDC' : '#848286'
+ text: translator.translate(qsTr('AUTO'), translator.language)
+ font.pixelSize: parent.height / 3
+ }
+ onCheckedChanged: {
+ console.debug('AUTO', checked)
+ }
+ }
+ ToggleButton {
+ onImage: './images/HMI_HVAC_Circulation_Active.svg'
+ offImage: './images/HMI_HVAC_Circulation_Inactive.svg'
+ onCheckedChanged: {
+ console.debug('Circulation', checked)
+ }
+ }
+ }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+ spacing: 20
+ SeatHeatButton {
+ id: rightSeat
+ side: 'Right'
+ }
+ HeatDegree {
+ onCurrentItemChanged: {
+ console.log("Right Temp changed",degree)
+ binding.rightTemperature = degree
+ }
+ }
+ }
+ }
+ RowLayout {
+ Layout.fillHeight: true
+ Layout.alignment: Qt.AlignHCenter
+ Repeater {
+ model: ['AirDown', 'AirUp', 'AirRight', 'Rear', 'Front']
+ ToggleButton {
+ onImage: './images/HMI_HVAC_%1_Active.svg'.arg(model.modelData)
+ offImage: './images/HMI_HVAC_%1_Inactive.svg'.arg(model.modelData)
+ rotation: 90
+ onCheckedChanged: {
+ console.debug(model.modelData, checked)
+ }
+ }
+ }
+ }
+ }
+}
+}
Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
DESCRIPTION = "Renesas Ethernet AVB demo applications"

require avb-applications.inc

LICENSE = "MIT & BSD"
LIC_FILES_CHKSUM = " \
    file://COPYING.MIT;md5=96659f2a7571bfa27483882a653c3bb9 \
    file://lib/msrp/LICENSE.BSD;md5=60ba0ea0afdcbf8d26ce31ce1503aba3 \
    file://lib/avdecc/jdksavdecc-c/COPYRIGHT;md5=6592ded5140540a936b8d98ed1b6a577 \
    file://avblauncher/inih/LICENSE.txt;md5=a7a95d2af90376e85a05318794e6f202 \
"

DEPENDS = "kernel-module-avb-streaming libyaml"

S = "${WORKDIR}/git/avb-demoapps"

includedir = "${RENESAS_DATADIR}/include"

# submodule is extracted before do_populate_lic
addtask do_init_submodule after do_unpack before do_patch

do_init_submodule() {
    export http_proxy=${http_proxy}
    export https_proxy=${https_proxy}
    export HTTP_PROXY=${HTTP_PROXY}
    export HTTPS_PROXY=${HTTPS_PROXY}
    cd ${S}
    git submodule init
    git submodule update
}

EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}'"

do_install_append() {
    oe_runmake install INSTALL_DIR=${D}/${bindir}

    # Create intall directories
    install -d ${D}/${sysconfdir}/linuxptp
    install -d ${D}/${sysconfdir}/daemon_cl
    install -d ${D}/${sysconfdir}/avblauncher

    # Install
    install -m 644 ${S}/etc/linuxptp/avb-demoapps.cfg ${D}/${sysconfdir}/linuxptp
    install -m 644 ${S}/etc/daemon_cl/gptp_cfg_100mb.ini ${D}/${sysconfdir}/daemon_cl
    install -m 644 ${S}/etc/daemon_cl/gptp_cfg.ini ${D}/${sysconfdir}/daemon_cl
    install -m 755 ${S}/etc/avblauncher/mse_aaf_pcm.sh ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_aaf_pcm_listener.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_aaf_pcm_talker.ini ${D}/${sysconfdir}/avblauncher
    install -m 755 ${S}/etc/avblauncher/mse_cvf_h264.sh ${D}/${sysconfdir}/avblauncher
    install -m 755 ${S}/etc/avblauncher/mse_cvf_h264_d13.sh ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_d13_listener.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_d13_talker.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_listener.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_talker.ini ${D}/${sysconfdir}/avblauncher
    install -m 755 ${S}/etc/avblauncher/mse_cvf_mjpeg.sh ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_cvf_mjpeg_listener.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_cvf_mjpeg_talker.ini ${D}/${sysconfdir}/avblauncher
    install -m 755 ${S}/etc/avblauncher/mse_iec61883_4.sh ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_iec61883_4_listener.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_iec61883_4_talker.ini ${D}/${sysconfdir}/avblauncher
    install -m 755 ${S}/etc/avblauncher/mse_iec61883_6.sh ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_iec61883_6_listener.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/mse_iec61883_6_talker.ini ${D}/${sysconfdir}/avblauncher
    install -m 755 ${S}/etc/avblauncher/simple_application.sh ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/simple_listener.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/simple_talker.ini ${D}/${sysconfdir}/avblauncher
    install -m 644 ${S}/etc/avblauncher/avdecc_entity_audio.yaml ${D}/${sysconfdir}/avblauncher
}

PACKAGES =+ " \
    ${PN}-simple \
    ${PN}-mrpdummy \
    ${PN}-avblauncher \
"

ALLOW_EMPTY_${PN} = "1"

FILES_${PN}-mrpdummy = " \
    ${bindir}/mrpdummy \
"

FILES_${PN}-avblauncher = " \
    ${sysconfdir}/daemon_cl/gptp_cfg_100mb.ini \
    ${sysconfdir}/daemon_cl/gptp_cfg.ini \
    ${sysconfdir}/avblauncher/mse_aaf_pcm.sh \
    ${sysconfdir}/avblauncher/mse_aaf_pcm_listener.ini \
    ${sysconfdir}/avblauncher/mse_aaf_pcm_talker.ini \
    ${sysconfdir}/avblauncher/mse_cvf_h264.sh \
    ${sysconfdir}/avblauncher/mse_cvf_h264_d13.sh \
    ${sysconfdir}/avblauncher/mse_cvf_h264_d13_listener.ini \
    ${sysconfdir}/avblauncher/mse_cvf_h264_d13_talker.ini \
    ${sysconfdir}/avblauncher/mse_cvf_h264_listener.ini \
    ${sysconfdir}/avblauncher/mse_cvf_h264_talker.ini \
    ${sysconfdir}/avblauncher/mse_cvf_mjpeg.sh \
    ${sysconfdir}/avblauncher/mse_cvf_mjpeg_listener.ini \
    ${sysconfdir}/avblauncher/mse_cvf_mjpeg_talker.ini \
    ${sysconfdir}/avblauncher/mse_iec61883_4.sh \
    ${sysconfdir}/avblauncher/mse_iec61883_4_listener.ini \
    ${sysconfdir}/avblauncher/mse_iec61883_4_talker.ini \
    ${sysconfdir}/avblauncher/mse_iec61883_6.sh \
    ${sysconfdir}/avblauncher/mse_iec61883_6_listener.ini \
    ${sysconfdir}/avblauncher/mse_iec61883_6_talker.ini \
    ${sysconfdir}/avblauncher/simple_application.sh \
    ${sysconfdir}/avblauncher/simple_listener.ini \
    ${sysconfdir}/avblauncher/simple_talker.ini \
    ${sysconfdir}/avblauncher/avdecc_entity_audio.yaml \
    ${bindir}/avblauncher \
"

FILES_${PN}-simple = " \
    ${sysconfdir}/linuxptp/avb-demoapps.cfg \
    ${bindir}/simple_talker \
    ${bindir}/simple_listener \
"

RDEPENDS_${PN} = " \
    ${PN}-simple \
    ${PN}-avblauncher \
"

RDEPENDS_${PN}-avblauncher = " \
    ${PN}-mrpdummy \
"