Skip to content

Commit 24217ee

Browse files
Update connection lib
1 parent d912416 commit 24217ee

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@codemirror/view": "^6.26.3",
1717
"@emotion/react": "^11.11.4",
1818
"@emotion/styled": "^11.11.5",
19-
"@microbit/microbit-connection": "^0.0.0-alpha.10",
19+
"@microbit/microbit-connection": "^0.0.0-alpha.14",
2020
"@microbit/microbit-fs": "^0.9.2",
2121
"@sanity/block-content-to-react": "^3.0.0",
2222
"@sanity/image-url": "^1.0.1",

src/device/mock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class MockDeviceConnection
9393
}
9494

9595
async disconnect(): Promise<void> {
96-
this.setStatus(ConnectionStatus.NOT_CONNECTED);
96+
this.setStatus(ConnectionStatus.DISCONNECTED);
9797
}
9898

9999
async serialWrite(data: string): Promise<void> {

src/device/simulator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export class SimulatorDeviceConnection
291291

292292
async initialize(): Promise<void> {
293293
window.addEventListener("message", this.messageListener);
294-
this.setStatus(ConnectionStatus.NOT_CONNECTED);
294+
this.setStatus(ConnectionStatus.DISCONNECTED);
295295
}
296296

297297
dispose() {
@@ -334,7 +334,7 @@ export class SimulatorDeviceConnection
334334

335335
async disconnect(): Promise<void> {
336336
window.removeEventListener("message", this.messageListener);
337-
this.setStatus(ConnectionStatus.NOT_CONNECTED);
337+
this.setStatus(ConnectionStatus.DISCONNECTED);
338338
}
339339

340340
async serialWrite(data: string): Promise<void> {

src/project/project-actions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class ProjectActions {
158158
if (
159159
!force &&
160160
(!showConnectHelpSetting ||
161-
this.device.status === ConnectionStatus.NOT_CONNECTED)
161+
this.device.status === ConnectionStatus.DISCONNECTED)
162162
) {
163163
return true;
164164
}
@@ -511,7 +511,7 @@ export class ProjectActions {
511511

512512
if (
513513
this.device.status === ConnectionStatus.NO_AUTHORIZED_DEVICE ||
514-
this.device.status === ConnectionStatus.NOT_CONNECTED
514+
this.device.status === ConnectionStatus.DISCONNECTED
515515
) {
516516
const connected = await this.connect(
517517
tryAgain || false,

0 commit comments

Comments
 (0)