Skip to content

Commit

Permalink
Fix port used in toit serial provision (#146)
Browse files Browse the repository at this point in the history
* Fix serial provision

* Update changelog
  • Loading branch information
lask authored Aug 30, 2021
1 parent a90fdf0 commit 903518a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.0] - 2021-08-24
## [1.3.0] - 2021-08-30
### Changed
- Cache serial info to keep the name displayed during monitoring.
- Deploy and run now prompts for a file if the current active file is incompatible with the action.

### Fixed
- Corrected port for provision button.

## [1.2.0] - 2021-08-20
### Added
- Device logs command and button in the device view.
Expand Down
6 changes: 3 additions & 3 deletions vscode/src/toitProvision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { window as Window } from "vscode";
import { SerialPort } from "./serialPort";
import { Context, ensureAuth, promptForWiFiInfo, selectPort } from "./utils";

async function serialMonitor(ctx: Context, serialPort?: SerialPort) {
async function serialProvision(ctx: Context, serialPort?: SerialPort) {
if (!await ensureAuth(ctx)) return;

const port = serialPort ? SerialPort.name : await selectPort(ctx);
const port = serialPort ? serialPort.name : await selectPort(ctx);
if (port === undefined) return; // Port selection prompt dismissed.

const wifiInfo = await promptForWiFiInfo();
Expand All @@ -26,5 +26,5 @@ async function serialMonitor(ctx: Context, serialPort?: SerialPort) {
}

export function createSerialProvision(ctx: Context): () => void {
return (port?: SerialPort) => serialMonitor(ctx, port);
return (port?: SerialPort) => serialProvision(ctx, port);
}

0 comments on commit 903518a

Please sign in to comment.