Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Fix serial monitor and extension dependency. #174

Merged
merged 1 commit into from
Mar 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@
"info",
"verbose"
]
},
"arduino.clangFormatStyle": {
"type": "string",
"desription": "The clang-format style value. Set this value to file if want to use the .clang-format file"
}
}
},
Expand Down Expand Up @@ -172,6 +168,9 @@
"postinstall": "node ./node_modules/vscode/bin/install && cd ./html && npm install",
"test": "node ./node_modules/vscode/bin/test"
},
"extensionDependencies": [
"ms-vscode.cpptools"
],
"devDependencies": {
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.40",
Expand Down
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ export async function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.workspace.registerTextDocumentContentProvider(ARDUINO_MANAGER_PROTOCOL, arduinoManagerProvider));

let registerCommand = (command: string, commandBody: (...args: any[]) => any, getUserData?: () => any): vscode.Disposable => {
return vscode.commands.registerCommand(command, async () => {
return vscode.commands.registerCommand(command, async (...args: any[]) => {
let guid = Uuid.create().value;
Logger.traceUserData(`start-command-` + command, { correlationId: guid });
let timer1 = new Logger.Timer();
let telemetryResult;
try {
let result = commandBody();
let result = commandBody(...args);
if (result) {
result = await Promise.resolve(result);
}
Expand Down
2 changes: 1 addition & 1 deletion src/serialmonitor/serialMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class SerialMonitor {
}
await this._serialPortCtrl.stop();
this.updatePortStatus(false);
} else {
} else if (!port) {
Logger.notifyUserWarning("closeSerialMonitorError", new Error(constants.messages.SERIAL_PORT_NOT_STARTED));
}
}
Expand Down