Skip to content

Commit

Permalink
Update connection lib
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-matt-hillsdon committed Jul 29, 2024
1 parent d912416 commit 24217ee
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@codemirror/view": "^6.26.3",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@microbit/microbit-connection": "^0.0.0-alpha.10",
"@microbit/microbit-connection": "^0.0.0-alpha.14",
"@microbit/microbit-fs": "^0.9.2",
"@sanity/block-content-to-react": "^3.0.0",
"@sanity/image-url": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/device/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class MockDeviceConnection
}

async disconnect(): Promise<void> {
this.setStatus(ConnectionStatus.NOT_CONNECTED);
this.setStatus(ConnectionStatus.DISCONNECTED);
}

async serialWrite(data: string): Promise<void> {
Expand Down
4 changes: 2 additions & 2 deletions src/device/simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export class SimulatorDeviceConnection

async initialize(): Promise<void> {
window.addEventListener("message", this.messageListener);
this.setStatus(ConnectionStatus.NOT_CONNECTED);
this.setStatus(ConnectionStatus.DISCONNECTED);
}

dispose() {
Expand Down Expand Up @@ -334,7 +334,7 @@ export class SimulatorDeviceConnection

async disconnect(): Promise<void> {
window.removeEventListener("message", this.messageListener);
this.setStatus(ConnectionStatus.NOT_CONNECTED);
this.setStatus(ConnectionStatus.DISCONNECTED);
}

async serialWrite(data: string): Promise<void> {
Expand Down
4 changes: 2 additions & 2 deletions src/project/project-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class ProjectActions {
if (
!force &&
(!showConnectHelpSetting ||
this.device.status === ConnectionStatus.NOT_CONNECTED)
this.device.status === ConnectionStatus.DISCONNECTED)
) {
return true;
}
Expand Down Expand Up @@ -511,7 +511,7 @@ export class ProjectActions {

if (
this.device.status === ConnectionStatus.NO_AUTHORIZED_DEVICE ||
this.device.status === ConnectionStatus.NOT_CONNECTED
this.device.status === ConnectionStatus.DISCONNECTED
) {
const connected = await this.connect(
tryAgain || false,
Expand Down

0 comments on commit 24217ee

Please sign in to comment.