Skip to content

Commit 71e5a5b

Browse files
committed
[experiments/bluetooth] Fix bug that connected keyboard instead of puzzle. Fixes #196.
The bug was introduced while refactoring in 1fa728e. Thanks to @anicola for reporting.
1 parent 9b01373 commit 71e5a5b

File tree

1 file changed

+5
-2
lines changed
  • src/sites/experiments.cubing.net/cubing.js/bluetooth

1 file changed

+5
-2
lines changed

src/sites/experiments.cubing.net/cubing.js/bluetooth/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { Alg } from "../../../../cubing/alg";
2-
import type { OrientationEvent } from "../../../../cubing/bluetooth";
2+
import {
3+
connectSmartPuzzle,
4+
OrientationEvent,
5+
} from "../../../../cubing/bluetooth";
36
import { debugKeyboardConnect, MoveEvent } from "../../../../cubing/bluetooth";
47
import { TwistyAlgViewer, TwistyPlayer } from "../../../../cubing/twisty";
58

@@ -33,7 +36,7 @@ window.addEventListener("DOMContentLoaded", async () => {
3336
// const acceptAllDevices = (document.querySelector(
3437
// "#acceptAllDevices",
3538
// ) as HTMLInputElement).checked;
36-
const puzzle = await debugKeyboardConnect();
39+
const puzzle = await connectSmartPuzzle();
3740
(globalThis as any).puzzle = puzzle;
3841
// TODO
3942
// try {

0 commit comments

Comments
 (0)