settingsModel.append({'icon': app.icon, 'title': app.title, 'checkable': app.checkable, 'app': app})
app.visible = false
+ if (app.isBluetooth) app.checkBluetooth()
if (app.isWifi) app.activateWifi()
}
}
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: []
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){