summaryrefslogtreecommitdiffstats
path: root/app/bluetooth/Bluetooth.qml
diff options
context:
space:
mode:
Diffstat (limited to 'app/bluetooth/Bluetooth.qml')
-rw-r--r--app/bluetooth/Bluetooth.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/bluetooth/Bluetooth.qml b/app/bluetooth/Bluetooth.qml
index a1cc5ae..71e3635 100644
--- a/app/bluetooth/Bluetooth.qml
+++ b/app/bluetooth/Bluetooth.qml
@@ -25,6 +25,7 @@ SettingPage {
icon: '/bluetooth/images/HMI_Settings_BluetoothIcon.svg'
title: 'Bluetooth'
checkable: true
+ readonly property bool isBluetooth: true
property string btAPIpath: bindingAddress + '/Bluetooth-manager/'
property var jsonObjectBT: []
@@ -431,6 +432,15 @@ SettingPage {
clip: true
}
+ function checkBluetooth() {
+ request(btAPIpath + 'power', function (o) {
+ // log the json response
+ var msg = JSON.parse(o.responseText)
+ console.log(o.responseText)
+ checked = msg.response.power == "on"
+ })
+ }
+
function findDevice(address){
for (var i = 0; i < btDeviceList.count; i++) {
if (address === btDeviceList.get(i).deviceAddress){