improve bluetooth pairing instructions

This commit is contained in:
liamcottle
2025-01-06 03:58:18 +13:00
parent fe9d0df1be
commit f73fe58b14

View File

@@ -1635,11 +1635,11 @@
await rnode.enableBluetooth(); await rnode.enableBluetooth();
console.log("enabling bluetooth: done"); console.log("enabling bluetooth: done");
await Utils.sleepMillis(1000); alert("Bluetooth has been enabled!");
// done // done
await Utils.sleepMillis(1000);
await rnode.close(); await rnode.close();
alert("Bluetooth has been enabled!");
}, },
async disableBluetooth() { async disableBluetooth() {
@@ -1663,12 +1663,11 @@
console.log("disabling bluetooth"); console.log("disabling bluetooth");
await rnode.disableBluetooth(); await rnode.disableBluetooth();
console.log("disabling bluetooth: done"); console.log("disabling bluetooth: done");
alert("Bluetooth has been disabled!");
await Utils.sleepMillis(1000);
// done // done
await Utils.sleepMillis(1000);
await rnode.close(); await rnode.close();
alert("Bluetooth has been disabled!");
}, },
async startBluetoothPairing() { async startBluetoothPairing() {
@@ -1700,7 +1699,14 @@
alert(error); alert(error);
} }
alert("RNode is in pairing mode. Close this alert and then pair from Android bluetooth settings. A pin will be shown on screen."); // tell user device is in pairing mode, and how to pair
alert([
"- RNode is in Bluetooth Pairing Mode for 30 seconds.",
"- Close this alert before performing the next steps.",
"- Open bluetooth settings on your Android device.",
"- Click pair on the RNode device that shows up.",
"- Bluetooth pin will shown on your RNode screen and on this page.",
].join("\n"));
}, },
async readAsBinaryString(blob) { async readAsBinaryString(blob) {