Use device specific language for output title

This commit is contained in:
Jacob Grossman 2021-12-01 21:38:48 -06:00
parent 2d2ca75177
commit 306c9ce3e8
5 changed files with 14 additions and 18 deletions

View File

@ -27,9 +27,6 @@ Python programming with LEGO Mindstorms. Our goal is to:
- [JAWS](https://www.freedomscientific.com/products/software/jaws/)
- [Apple VoiceOver](https://support.apple.com/guide/voiceover-guide/welcome/web/)
<!-- TODO: still need this -->
- Play audio alerts for syntax and runtime errors.
- Present a summary of the scope for an individual line of code.
- Save and load programs directly onto the LEGO Hub from within Visual Studio Code

View File

@ -268,20 +268,20 @@
"configuration": {
"title": "Mind_Reader",
"properties": {
"mindreader.productType": {
"mindReader.productType": {
"type": "string",
"description": "Specifies the LEGO® product.",
"default": "MINDSTORMS® EV3",
"default": "MINDSTORMS EV3",
"enum": [
"MINDSTORMS® EV3",
"SPIKE Prime"
"MINDSTORMS EV3",
"SPIKE Prime"
],
"enumDescriptions": [
"LEGO® MINDSTORMS® EV3 (31313)",
"LEGO® Education SPIKE™ Prime Set (45678)"
]
},
"mindreader.reader.screenReader": {
"mindReader.reader.screenReader": {
"type": "string",
"description": "Specifies which screen reader to optimize for.",
"default": "NVDA",
@ -296,16 +296,16 @@
"Apple VoiceOver (macOS)"
]
},
"mindreader.reader.contextWindow": {
"mindReader.reader.contextWindow": {
"type": "number",
"description": "The number of words around the cursor to use when reading the cursor context",
"default": 1
},
"mindreader.connection.portPath": {
"mindReader.connection.portPath": {
"type": "string",
"markdownDescription": "Specifies the serial port path to use if `#mindreader.connectAutomatically#` is not set."
"markdownDescription": "Specifies the serial port path to use if `#mindReader.connectAutomatically#` is not set."
},
"mindreader.connection.clearOutputOnRun": {
"mindReader.connection.clearOutputOnRun": {
"type": "boolean",
"description": "Whether to clear the output each time the program is run",
"default": "true"

View File

@ -318,7 +318,7 @@ function createContextString(context: pl.LexNode[], line: number): string {
}
// find up to `n` words around the cursor, where `n` is
// the value of `#mindreader.reader.contextWindow`
// the value of `#mindReader.reader.contextWindow`
function runCursorContext(): void {
let editor = vscode.window.activeTextEditor;
if (!editor) {
@ -328,7 +328,7 @@ function runCursorContext(): void {
const cursorPos: vscode.Position = editor.selection.active;
const text: string = editor.document.lineAt(cursorPos).text;
const windowSize: number = vscode.workspace.getConfiguration('mindreader').get('reader.contextWindow')!;
const windowSize: number = vscode.workspace.getConfiguration('mindReader').get('reader.contextWindow')!;
let trimmedText = text.trimStart(); // trim leading whitespace
let leadingWS = text.length - trimmedText.length; // # of characters of leading whitespace
@ -401,7 +401,7 @@ async function connectHub(): Promise<void> {
return;
}
let portPath: string | undefined = vscode.workspace.getConfiguration('mindreader.connection').get('portPath');
let portPath: string | undefined = vscode.workspace.getConfiguration('mindReader.connection').get('portPath');
if (!portPath) {
let slots: vscode.QuickPickItem[] = [];

View File

@ -7,13 +7,13 @@ import CommandNodeProvider from './commandNodeProvider';
import Logger from './log';
// Output Logger
const outputChannel = vscode.window.createOutputChannel("SPIKE Prime Output");
const product: string = vscode.workspace.getConfiguration('mindReader').get('productType')!;
const outputChannel = vscode.window.createOutputChannel(product + " Output");
export const logger = new Logger(outputChannel);
let parser: pl.Parser = new pl.Parser();
export function activate(context: vscode.ExtensionContext) {
console.log('Congratulations, your extension "mind-reader" is now active!');
vscode.window.showInformationMessage('Mind_Reader is loaded!');
parser.parse('Beep Boop');

View File

@ -190,7 +190,6 @@ export default class HubManager {
}
// ========================= Hub Methods =========================
// TODO: only spike is supported rn -> m_strType
//
// These methods each handle a single RPC method's communication.