mirror of
https://github.com/We-Dont-Byte/Mind_Reader.git
synced 2024-11-15 03:35:59 +00:00
Add error notification, bump version number
This commit is contained in:
parent
b3984daad5
commit
6067a88fb8
@ -2,8 +2,7 @@
|
|||||||
"name": "mind-reader",
|
"name": "mind-reader",
|
||||||
"displayName": "Mind_Reader",
|
"displayName": "Mind_Reader",
|
||||||
"repository": "https://github.com/SingleSemesterSnobs/Mind_Reader",
|
"repository": "https://github.com/SingleSemesterSnobs/Mind_Reader",
|
||||||
"description": "",
|
"version": "1.0.0",
|
||||||
"version": "0.0.1",
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.60.0"
|
"vscode": "^1.60.0"
|
||||||
},
|
},
|
||||||
@ -303,7 +302,7 @@
|
|||||||
},
|
},
|
||||||
"mindReader.connection.portPath": {
|
"mindReader.connection.portPath": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"markdownDescription": "Specifies the serial port path to use if `#mindReader.connectAutomatically#` is not set."
|
"markdownDescription": "The default port to try and establish a connection on."
|
||||||
},
|
},
|
||||||
"mindReader.connection.clearOutputOnRun": {
|
"mindReader.connection.clearOutputOnRun": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
@ -388,7 +388,7 @@ let hub: HubManager | null = null;
|
|||||||
|
|
||||||
// TODO: port option
|
// TODO: port option
|
||||||
async function connectHub(): Promise<void> {
|
async function connectHub(): Promise<void> {
|
||||||
if (hub) {
|
if (hub && hub.isOpen()) {
|
||||||
vscode.window.showWarningMessage('LEGO Hub is already connected, reconnecting...');
|
vscode.window.showWarningMessage('LEGO Hub is already connected, reconnecting...');
|
||||||
disconnectHub();
|
disconnectHub();
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import * as vscode from 'vscode';
|
||||||
import * as SerialPort from 'serialport';
|
import * as SerialPort from 'serialport';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
@ -97,6 +98,7 @@ export default class HubManager {
|
|||||||
logger.error(Buffer.from(params[3], 'base64').toString());
|
logger.error(Buffer.from(params[3], 'base64').toString());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
vscode.window.showErrorMessage("Program Error.")
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('Could not parse JSON:', msg);
|
console.log('Could not parse JSON:', msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user