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.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 mf_build = vscode.commands.registerCommand('mfbuild', function () {
  7. vscode.commands.executeCommand('workbench.action.files.saveAll');
  8. const terminal = vscode.window.createTerminal(`Marlin Build #${NEXT_TERM_ID++}`);
  9. terminal.show(true);
  10. terminal.sendText("python buildroot/share/atom/auto_build.py build");
  11. });
  12. var mf_upload = vscode.commands.registerCommand('mfupload', function () {
  13. vscode.commands.executeCommand('workbench.action.files.saveAll');
  14. const terminal = vscode.window.createTerminal(`Marlin Upload #${NEXT_TERM_ID++}`);
  15. terminal.show(true);
  16. terminal.sendText("python buildroot/share/atom/auto_build.py upload");
  17. });
  18. var mf_traceback = vscode.commands.registerCommand('mftraceback', function () {
  19. vscode.commands.executeCommand('workbench.action.files.saveAll');
  20. const terminal = vscode.window.createTerminal(`Marlin Traceback #${NEXT_TERM_ID++}`);
  21. terminal.show(true);
  22. terminal.sendText("python buildroot/share/atom/auto_build.py traceback");
  23. });
  24. var mf_clean = vscode.commands.registerCommand('mfclean', function () {
  25. const terminal = vscode.window.createTerminal(`Marlin Clean #${NEXT_TERM_ID++}`);
  26. terminal.show(true);
  27. terminal.sendText("python buildroot/share/atom/auto_build.py clean");
  28. });
  29. context.subscriptions.push(mf_build);
  30. context.subscriptions.push(mf_upload);
  31. context.subscriptions.push(mf_traceback);
  32. context.subscriptions.push(mf_clean);
  33. }
  34. exports.activate = activate;
  35. // this method is called when your extension is deactivated
  36. function deactivate() {
  37. }
  38. exports.deactivate = deactivate;