.
This commit is contained in:
Vendored
+36
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Odoo: Attach",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"port": 5678,
|
||||
"debugServer": 5678,
|
||||
"host": "localhost",
|
||||
"pathMappings": [
|
||||
{
|
||||
"localRoot": "${workspaceFolder}",
|
||||
"remoteRoot": "/octoprint/octoprint/plugins/OctoPrint-CalibrationTools",
|
||||
}
|
||||
],
|
||||
"cwd": "${workspaceFolder}/src",
|
||||
"logToFile": true
|
||||
},
|
||||
{
|
||||
"name": "Python: Remote Attach",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"connect": {
|
||||
"host": "localhost",
|
||||
"port": 5678
|
||||
},
|
||||
"pathMappings": [
|
||||
{
|
||||
"localRoot": "${workspaceFolder}",
|
||||
"remoteRoot": "/octoprint/octoprint/plugins/OctoPrint-CalibrationTools",
|
||||
}
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
// "python.defaultInterpreterPath": "venv3/bin/python",
|
||||
"python.formatting.provider": "black",
|
||||
"python.formatting.blackArgs": [
|
||||
"--config",
|
||||
"black.toml"
|
||||
],
|
||||
"editor.formatOnSave": true,
|
||||
"python.sortImports.args": [
|
||||
"--profile=black",
|
||||
],
|
||||
"[python]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": true
|
||||
}
|
||||
},
|
||||
"python.linting.pylintEnabled": false,
|
||||
// "python.linting.flake8Enabled": true,
|
||||
"python.linting.enabled": true
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
{
|
||||
// "version": "0.2.0",
|
||||
// "configurations": [
|
||||
// {
|
||||
// "name": "OctoPrint",
|
||||
// "type": "python",
|
||||
// "request": "launch",
|
||||
// "module": "octoprint",
|
||||
// "args": [
|
||||
// "serve",
|
||||
// "--debug"
|
||||
// ],
|
||||
// "cwd": "${workspaceFolder}/octoprint_CalibrationTools",
|
||||
// "preLaunchTask": "clean build artifacts"
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
||||
|
||||
import octoprint.plugin
|
||||
|
||||
from octoprint_CalibrationTools import (api, hooks, models)
|
||||
from octoprint_CalibrationTools import api, hooks, models
|
||||
|
||||
defaultSettings = {
|
||||
"eSteps": {
|
||||
@@ -16,6 +16,7 @@ defaultSettings = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CalibrationtoolsPlugin(
|
||||
octoprint.plugin.StartupPlugin,
|
||||
octoprint.plugin.TemplatePlugin,
|
||||
@@ -32,7 +33,7 @@ class CalibrationtoolsPlugin(
|
||||
self.collectCommand = False
|
||||
|
||||
def on_after_startup(self):
|
||||
self._logger.debug("----------------[ CalibrationTools ]----------------")
|
||||
self._logger.debug("---------------[ CalibrationTools ]---------------")
|
||||
self.data = self.getModel()
|
||||
self.collectCommand = True
|
||||
self._printer.commands("M92")
|
||||
|
||||
@@ -69,8 +69,7 @@ class API(octoprint.plugin.SimpleApiPlugin):
|
||||
|
||||
if command == CMD_SAVE_E_STEPS:
|
||||
cmds = ["M92 E%(newESteps)s" % data, "M500"]
|
||||
if self.
|
||||
cmds = cmds + ["M104 S0"]
|
||||
cmds = cmds + ["M104 S0"]
|
||||
self._printer.commands()
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user