├── MANIFEST.in ├── screenshot.png ├── paypal-with-text.png ├── patreon-with-text-new.png ├── screenshot_settings.png ├── .github ├── FUNDING.yml ├── stale.yml └── workflows │ └── stale.yml ├── .gitignore ├── babel.cfg ├── requirements.txt ├── .editorconfig ├── extras ├── README.txt └── BLTouch.md ├── translations └── README.txt ├── octoprint_BLTouch ├── __init__.py ├── templates │ └── BLTouch_settings.jinja2 └── static │ └── js │ └── BLTouch.js ├── README.md └── setup.py /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md 2 | recursive-include octoprint_BLTouch * 3 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jneilliii/OctoPrint-BLTouch/HEAD/screenshot.png -------------------------------------------------------------------------------- /paypal-with-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jneilliii/OctoPrint-BLTouch/HEAD/paypal-with-text.png -------------------------------------------------------------------------------- /patreon-with-text-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jneilliii/OctoPrint-BLTouch/HEAD/patreon-with-text-new.png -------------------------------------------------------------------------------- /screenshot_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jneilliii/OctoPrint-BLTouch/HEAD/screenshot_settings.png -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [jneilliii] 2 | patreon: jneilliii 3 | custom: ['https://www.paypal.me/jneilliii'] 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.swp 3 | .idea 4 | *.iml 5 | build 6 | dist 7 | *.egg* 8 | .DS_Store 9 | *.zip 10 | -------------------------------------------------------------------------------- /babel.cfg: -------------------------------------------------------------------------------- 1 | [python: */**.py] 2 | [jinja2: */**.jinja2] 3 | extensions=jinja2.ext.autoescape, jinja2.ext.with_ 4 | 5 | [javascript: */**.js] 6 | extract_messages = gettext, ngettext 7 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | ### 2 | # This file is only here to make sure that something like 3 | # 4 | # pip install -e . 5 | # 6 | # works as expected. Requirements can be found in setup.py. 7 | ### 8 | 9 | . 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | charset = utf-8 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [**.py] 13 | indent_style = tab 14 | 15 | [**.js] 16 | indent_style = space 17 | indent_size = 4 18 | -------------------------------------------------------------------------------- /extras/README.txt: -------------------------------------------------------------------------------- 1 | Currently Cookiecutter generates the following helpful extras to this folder: 2 | 3 | BLTouch.md 4 | Data file for plugins.octoprint.org. Fill in the missing TODOs once your 5 | plugin is ready for release and file a PR as described at 6 | http://plugins.octoprint.org/help/registering/ to get it published. 7 | 8 | This folder may be safely removed if you don't need it. 9 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 14 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - enhancement 8 | - bug 9 | # Label to use when marking an issue as stale 10 | staleLabel: stale 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | activity in 14 days. It will be closed if no further activity occurs in 7 days. 15 | # Comment to post when closing a stale issue. Set to `false` to disable 16 | closeComment: false 17 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark Stale Issues 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | # permissions: 7 | # actions: write 8 | jobs: 9 | stale: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/stale@v9 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | stale-issue-message: 'This issue has been automatically marked as stale because it has not had activity in 14 days. It will be closed if no further activity occurs in 7 days' 16 | days-before-stale: 14 17 | days-before-close: 7 18 | stale-issue-label: 'stale' 19 | days-before-issue-stale: 14 20 | days-before-pr-stale: -1 21 | days-before-issue-close: 7 22 | days-before-pr-close: -1 23 | exempt-issue-labels: 'bug,enhancement' 24 | # - uses: actions/checkout@v4 25 | # - uses: gautamkrishnar/keepalive-workflow@v2 26 | # with: 27 | # use_api: true 28 | -------------------------------------------------------------------------------- /extras/BLTouch.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: plugin 3 | 4 | id: BLTouch 5 | title: OctoPrint-BLTouch 6 | description: Simple plugin to add BLTouch controls to the Control tab. 7 | author: jneilliii 8 | license: AGPLv3 9 | 10 | date: 2017-01-10 11 | 12 | homepage: https://github.com/jneilliii/OctoPrint-BLTouch 13 | source: https://github.com/jneilliii/OctoPrint-BLTouch 14 | archive: https://github.com/jneilliii/OctoPrint-BLTouch/archive/master.zip 15 | 16 | follow_dependency_links: false 17 | 18 | # TODO 19 | tags: 20 | - BLTouch 21 | 22 | screenshots: 23 | - url: /assets/img/plugins/BLTouch/screenshot.png 24 | alt: BLTouch 25 | caption: BLTouch Controls 26 | 27 | featuredimage: /assets/img/plugins/BLTouch/screenshot.png 28 | 29 | compatibility: 30 | # list of compatible versions, for example 1.2.0. If left empty no specific version requirement will be assumed 31 | octoprint: 32 | - 1.2.0 33 | 34 | # list of compatible operating systems, valid values are linux, windows, macos, leaving empty defaults to all 35 | os: 36 | - linux 37 | - windows 38 | - macos 39 | --- 40 | 41 | Simple plugin to add BLTouch controls to the Control tab. 42 | 43 | http://plugins.octoprint.org/plugin/BLTouch/ 44 | -------------------------------------------------------------------------------- /translations/README.txt: -------------------------------------------------------------------------------- 1 | Your plugin's translations will reside here. The provided setup.py supports a 2 | couple of additional commands to make managing your translations easier: 3 | 4 | babel_extract 5 | Extracts any translateable messages (marked with Jinja's `_("...")` or 6 | JavaScript's `gettext("...")`) and creates the initial `messages.pot` file. 7 | babel_refresh 8 | Reruns extraction and updates the `messages.pot` file. 9 | babel_new --locale= 10 | Creates a new translation folder for locale ``. 11 | babel_compile 12 | Compiles the translations into `mo` files, ready to be used within 13 | OctoPrint. 14 | babel_pack --locale= [ --author= ] 15 | Packs the translation for locale `` up as an installable 16 | language pack that can be manually installed by your plugin's users. This is 17 | interesting for languages you can not guarantee to keep up to date yourself 18 | with each new release of your plugin and have to depend on contributors for. 19 | 20 | If you want to bundle translations with your plugin, create a new folder 21 | `octoprint_BLTouch/translations`. When that folder exists, 22 | an additional command becomes available: 23 | 24 | babel_bundle --locale= 25 | Moves the translation for locale `` to octoprint_BLTouch/translations, 26 | effectively bundling it with your plugin. This is interesting for languages 27 | you can guarantee to keep up to date yourself with each new release of your 28 | plugin. 29 | -------------------------------------------------------------------------------- /octoprint_BLTouch/__init__.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | from __future__ import absolute_import 3 | 4 | import octoprint.plugin 5 | 6 | 7 | class BLTouchPlugin(octoprint.plugin.AssetPlugin, octoprint.plugin.TemplatePlugin, octoprint.plugin.SettingsPlugin): 8 | ##-- AssetPlugin 9 | def get_assets(self): 10 | return dict( 11 | js=["js/BLTouch.js"] 12 | ) 13 | 14 | ##-- Settings hooks 15 | def get_settings_defaults(self): 16 | return dict(cmdProbeUp="M280 P0 S90", cmdProbeDown="M280 P0 S10", cmdSelfTest="M280 P0 S120", 17 | cmdReleaseAlarm="M280 P0 S160", cmdProbeBed="G29", cmdSaveSettings="M500", confirmation=True, cmdRepeatability="") 18 | 19 | ##-- Template hooks 20 | def get_template_configs(self): 21 | return [dict(type="settings", custom_bindings=False), dict(type="controls", custom_bindings=False)] 22 | 23 | ##~~ Softwareupdate hook 24 | def get_update_information(self): 25 | return dict( 26 | BLTouch=dict( 27 | displayName="BLTouch Plugin", 28 | displayVersion=self._plugin_version, 29 | 30 | # version check: github repository 31 | type="github_release", 32 | user="jneilliii", 33 | repo="OctoPrint-BLTouch", 34 | current=self._plugin_version, 35 | stable_branch=dict( 36 | name="Stable", 37 | branch="master", 38 | comittish=["master"] 39 | ), 40 | prerelease_branches=[ 41 | dict( 42 | name="Release Candidate", 43 | branch="rc", 44 | comittish=["rc", "master"] 45 | ) 46 | ], 47 | 48 | # update method: pip 49 | pip="https://github.com/jneilliii/OctoPrint-Bltouch/archive/{target_version}.zip" 50 | ) 51 | ) 52 | 53 | 54 | __plugin_name__ = "BLTouch Plugin" 55 | __plugin_pythoncompat__ = ">=2.7,<4" 56 | 57 | 58 | def __plugin_load__(): 59 | global __plugin_implementation__ 60 | __plugin_implementation__ = BLTouchPlugin() 61 | 62 | global __plugin_hooks__ 63 | __plugin_hooks__ = { 64 | "octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.get_update_information 65 | } 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OctoPrint-BLTouch 2 | 3 | A simple plugin to add buttons on the control tab to manage BLTouch. This plugin does not do auto bed leveling or utilize your BLTouch in any way to probe your mesh. It is just a utility plugin that adds buttons to the control tab that allows you to send the required GCODE commands to your printer to interact with the BLTouch probe. If you are looking for what those commands should be you should check the [manual](https://www.antclabs.com/manual) for the version of BLTouch that you have. 4 | 5 | ![screenshot](screenshot.png) 6 | 7 | ## Setup 8 | 9 | Install via the bundled [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) 10 | or manually using this URL: 11 | 12 | https://github.com/jneilliii/OctoPrint-Bltouch/archive/master.zip 13 | 14 | ## Settings 15 | 16 | ![settings screenshot](screenshot_settings.png) 17 | 18 | ## Get Help 19 | 20 | If you experience issues with this plugin or need assistance please use the issue tracker by clicking issues above. 21 | 22 | ### Additional Plugins 23 | 24 | Check out my other plugins [here](https://plugins.octoprint.org/by_author/#jneilliii) 25 | 26 | ### Sponsors 27 | - Andreas Lindermayr 28 | - [@TheTuxKeeper](https://github.com/thetuxkeeper) 29 | - [@tideline3d](https://github.com/tideline3d/) 30 | - [SimplyPrint](https://simplyprint.io/) 31 | - [Andrew Beeman](https://github.com/Kiendeleo) 32 | - [Calanish](https://github.com/calanish) 33 | - [Lachlan Bell](https://lachy.io/) 34 | - [Jonny Bergdahl](https://github.com/bergdahl) 35 | ## Support My Efforts 36 | I, jneilliii, programmed this plugin for fun and do my best effort to support those that have issues with it, please return the favor and leave me a tip or become a Patron if you find this plugin helpful and want me to continue future development. 37 | 38 | [![Patreon](patreon-with-text-new.png)](https://www.patreon.com/jneilliii) [![paypal](paypal-with-text.png)](https://paypal.me/jneilliii) 39 | 40 | No paypal.me? Send funds via PayPal to jneilliii@gmail.com 41 | -------------------------------------------------------------------------------- /octoprint_BLTouch/templates/BLTouch_settings.jinja2: -------------------------------------------------------------------------------- 1 |

BLTouch Settings

2 | Enter the GCODE commands necessary for the BLTouch to work with your firmware. Default settings are for Marlin. 3 |
4 |
5 | 6 |
7 | 8 |
9 |
10 |
11 | 12 |
13 | 14 |
15 |
16 |
17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 | 32 |
33 |
34 |
35 | 36 |
37 | 38 |
39 |
40 |
41 | 42 |
43 | 44 |
45 |
46 |
47 | 48 |
49 | 50 |
51 |
52 |
53 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | ######################################################################################################################## 4 | ### Do not forget to adjust the following variables to your own plugin. 5 | 6 | # The plugin's identifier, has to be unique 7 | plugin_identifier = "BLTouch" 8 | 9 | # The plugin's python package, should be "octoprint_", has to be unique 10 | plugin_package = "octoprint_BLTouch" 11 | 12 | # The plugin's human readable name. Can be overwritten within OctoPrint's internal data via __plugin_name__ in the 13 | # plugin module 14 | plugin_name = "OctoPrint-BLTouch" 15 | 16 | # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module 17 | plugin_version = "0.3.4" 18 | 19 | # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin 20 | # module 21 | plugin_description = "Plugin to add control buttons to the control tab of OctoPrint for the BLTouch." 22 | 23 | # The plugin's author. Can be overwritten within OctoPrint's internal data via __plugin_author__ in the plugin module 24 | plugin_author = "jneilliii" 25 | 26 | # The plugin's author's mail address. 27 | plugin_author_email = "jneilliii@gmail.com" 28 | 29 | # The plugin's homepage URL. Can be overwritten within OctoPrint's internal data via __plugin_url__ in the plugin module 30 | plugin_url = "https://github.com/jneilliii/OctoPrint-Bltouch" 31 | 32 | # The plugin's license. Can be overwritten within OctoPrint's internal data via __plugin_license__ in the plugin module 33 | plugin_license = "AGPLv3" 34 | 35 | # Any additional requirements besides OctoPrint should be listed here 36 | plugin_requires = [] 37 | 38 | ### -------------------------------------------------------------------------------------------------------------------- 39 | ### More advanced options that you usually shouldn't have to touch follow after this point 40 | ### -------------------------------------------------------------------------------------------------------------------- 41 | 42 | # Additional package data to install for this plugin. The subfolders "templates", "static" and "translations" will 43 | # already be installed automatically if they exist. 44 | plugin_additional_data = [] 45 | 46 | # Any additional python packages you need to install with your plugin that are not contained in .* 47 | plugin_additional_packages = [] 48 | 49 | # Any python packages within .* you do NOT want to install with your plugin 50 | plugin_ignored_packages = [] 51 | 52 | # Additional parameters for the call to setuptools.setup. If your plugin wants to register additional entry points, 53 | # define dependency links or other things like that, this is the place to go. Will be merged recursively with the 54 | # default setup parameters as provided by octoprint_setuptools.create_plugin_setup_parameters using 55 | # octoprint.util.dict_merge. 56 | # 57 | # Example: 58 | # plugin_requires = ["someDependency==dev"] 59 | # additional_setup_parameters = {"dependency_links": ["https://github.com/someUser/someRepo/archive/master.zip#egg=someDependency-dev"]} 60 | additional_setup_parameters = {} 61 | 62 | ######################################################################################################################## 63 | 64 | from setuptools import setup 65 | 66 | try: 67 | import octoprint_setuptools 68 | except: 69 | print("Could not import OctoPrint's setuptools, are you sure you are running that under " 70 | "the same python installation that OctoPrint is installed under?") 71 | import sys 72 | sys.exit(-1) 73 | 74 | setup_parameters = octoprint_setuptools.create_plugin_setup_parameters( 75 | identifier=plugin_identifier, 76 | package=plugin_package, 77 | name=plugin_name, 78 | version=plugin_version, 79 | description=plugin_description, 80 | author=plugin_author, 81 | mail=plugin_author_email, 82 | url=plugin_url, 83 | license=plugin_license, 84 | requires=plugin_requires, 85 | additional_packages=plugin_additional_packages, 86 | ignored_packages=plugin_ignored_packages, 87 | additional_data=plugin_additional_data 88 | ) 89 | 90 | if len(additional_setup_parameters): 91 | from octoprint.util import dict_merge 92 | setup_parameters = dict_merge(setup_parameters, additional_setup_parameters) 93 | 94 | setup(**setup_parameters) 95 | -------------------------------------------------------------------------------- /octoprint_BLTouch/static/js/BLTouch.js: -------------------------------------------------------------------------------- 1 | /* 2 | * View model for OctoPrint-Bltouch 3 | * 4 | * Author: jneilliii 5 | * License: AGPLv3 6 | */ 7 | $(function() { 8 | function BLTouchViewModel(parameters) { 9 | var self = this; 10 | 11 | // assign the injected parameters, e.g.: 12 | self.controlViewModel = parameters[0]; 13 | self.settingsViewModel = parameters[1]; 14 | 15 | self.cmdProbeUp = ko.observable(); 16 | self.cmdProbeDown = ko.observable(); 17 | self.cmdSelfTest = ko.observable(); 18 | self.cmdReleaseAlarm = ko.observable(); 19 | self.cmdProbeBed = ko.observable(); 20 | self.cmdSaveSettings = ko.observable(); 21 | 22 | self.getAdditionalControls = function() { 23 | if (self.settingsViewModel.settings.plugins.BLTouch.confirmation()) { 24 | var buttons = [ 25 | { name: "BLTouch", type: "section", layout: "horizontal", children: [ 26 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdProbeUp());", name: "Probe Up", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 27 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdProbeDown());", name: "Probe Down", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 28 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdSelfTest());", name: "Test", confirm: "You are about to run a self test.", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 29 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdReleaseAlarm());", name: "Release", confirm: "You are about to release the alarm.", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 30 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdProbeBed().split('\\n'));", name: "Probe Bed", confirm: "You are about to probe the bed.", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 31 | 32 | ]} 33 | ]; 34 | if(self.settingsViewModel.settings.plugins.BLTouch.cmdRepeatability() !== ""){ 35 | buttons[0].children.push({type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdRepeatability());", name: "Repeat Test", confirm: "You are about to run a repeatability test.", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}); 36 | } 37 | buttons[0].children.push({type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdSaveSettings());", name: "Save", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}); 38 | } else { 39 | var buttons =[ 40 | { name: "BLTouch", type: "section", layout: "horizontal", children: [ 41 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdProbeUp());", name: "Probe Up", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 42 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdProbeDown());", name: "Probe Down", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 43 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdSelfTest());", name: "Test", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 44 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdReleaseAlarm());", name: "Release", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 45 | {type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdProbeBed().split('\\n'));", name: "Probe Bed", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}, 46 | ]} 47 | ]; 48 | if(self.settingsViewModel.settings.plugins.BLTouch.cmdRepeatability() !== ""){ 49 | buttons[0].children.push({type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdRepeatability());", name: "Repeat", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}); 50 | } 51 | buttons[0].children.push({type: "javascript", javascript: "OctoPrint.control.sendGcode(self.settings.settings.plugins.BLTouch.cmdSaveSettings());", name: "Save", enabled: "!self.isPrinting() && self.loginState.hasPermission(self.access.permissions.CONTROL) && self.isOperational()"}); 52 | } 53 | return buttons; 54 | }; 55 | 56 | self.onBeforeBinding = function() { 57 | self.cmdProbeUp(self.settingsViewModel.settings.plugins.BLTouch.cmdProbeUp()); 58 | self.cmdProbeDown(self.settingsViewModel.settings.plugins.BLTouch.cmdProbeDown()); 59 | self.cmdSelfTest(self.settingsViewModel.settings.plugins.BLTouch.cmdSelfTest()); 60 | self.cmdReleaseAlarm(self.settingsViewModel.settings.plugins.BLTouch.cmdReleaseAlarm()); 61 | self.cmdProbeBed(self.settingsViewModel.settings.plugins.BLTouch.cmdProbeBed()); 62 | self.cmdSaveSettings(self.settingsViewModel.settings.plugins.BLTouch.cmdSaveSettings()); 63 | }; 64 | 65 | self.onEventSettingsUpdated = function (payload) { 66 | self.cmdProbeUp = self.settingsViewModel.settings.plugins.BLTouch.cmdProbeUp(); 67 | self.cmdProbeDown = self.settingsViewModel.settings.plugins.BLTouch.cmdProbeDown(); 68 | self.cmdSelfTest = self.settingsViewModel.settings.plugins.BLTouch.cmdSelfTest(); 69 | self.cmdReleaseAlarm = self.settingsViewModel.settings.plugins.BLTouch.cmdReleaseAlarm(); 70 | self.cmdProbeBed(self.settingsViewModel.settings.plugins.BLTouch.cmdProbeBed()); 71 | self.cmdSaveSettings(self.settingsViewModel.settings.plugins.BLTouch.cmdSaveSettings()); 72 | }; 73 | }; 74 | 75 | // view model class, parameters for constructor, container to bind to 76 | ADDITIONAL_VIEWMODELS.push([ 77 | BLTouchViewModel, 78 | 79 | // e.g. loginStateViewModel, settingsViewModel, ... 80 | ["controlViewModel","settingsViewModel"], 81 | 82 | // e.g. #settings_plugin_BLTouch, #tab_plugin_BLTouch, ... 83 | ["settings_plugin_BLTouch_form"] 84 | ]); 85 | }); 86 | --------------------------------------------------------------------------------