My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

extension.js 1.4KB

12345678910111213141516171819202122232425262728293031323334353637
  1. 'use strict';
  2. var vscode = require('vscode');
  3. function activate(context) {
  4. console.log('Extension "AutoBuildMarlin" is now active!');
  5. var NEXT_TERM_ID = 1;
  6. var pio_build = vscode.commands.registerCommand('piobuild', function () {
  7. const terminal = vscode.window.createTerminal(`#${NEXT_TERM_ID++}`);
  8. terminal.sendText("python buildroot/share/atom/auto_build.py build");
  9. });
  10. var pio_clean = vscode.commands.registerCommand('pioclean', function () {
  11. const terminal = vscode.window.createTerminal(`#${NEXT_TERM_ID++}`);
  12. terminal.sendText("python buildroot/share/atom/auto_build.py clean");
  13. });
  14. var pio_upload = vscode.commands.registerCommand('pioupload', function () {
  15. const terminal = vscode.window.createTerminal(`#${NEXT_TERM_ID++}`);
  16. terminal.sendText("python buildroot/share/atom/auto_build.py upload");
  17. });
  18. var pio_traceback = vscode.commands.registerCommand('piotraceback', function () {
  19. const terminal = vscode.window.createTerminal(`#${NEXT_TERM_ID++}`);
  20. terminal.sendText("python buildroot/share/atom/auto_build.py traceback");
  21. });
  22. context.subscriptions.push(pio_build);
  23. context.subscriptions.push(pio_clean);
  24. context.subscriptions.push(pio_upload);
  25. context.subscriptions.push(pio_traceback);
  26. }
  27. exports.activate = activate;
  28. // this method is called when your extension is deactivated
  29. function deactivate() {
  30. }
  31. exports.deactivate = deactivate;