We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25b2a4a commit ae086d5Copy full SHA for ae086d5
1 file changed
godice.js
@@ -280,6 +280,20 @@ class GoDice {
280
this.connectDeviceAndCacheCharacteristics();
281
});
282
}
283
+
284
+ /**
285
+ * Attempts to reconnect to the device incase of disconnect
286
+ */
287
+ attemptReconnect() {
288
+ if (this.bluetoothDevice) {
289
+ // This object's device exists
290
+ if (this.bluetoothDevice.gatt.connected) {
291
+ console.debug(this.GlobalDeviceId + "'s Bluetooth device is already connected")
292
+ } else {
293
+ this.connectDeviceAndCacheCharacteristics()
294
+ }
295
296
297
298
/**
299
* Turn On/Off RGB LEDs, will turn off if led1 and led2 are null
0 commit comments