.
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
|
import octoprint.plugin
|
||||||
|
|
||||||
from octoprint_CalibrationTools import (api, hooks, models)
|
from octoprint_CalibrationTools import api, hooks, models
|
||||||
|
|
||||||
defaultSettings = {
|
defaultSettings = {
|
||||||
"eSteps": {
|
"eSteps": {
|
||||||
@@ -16,6 +16,7 @@ defaultSettings = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class CalibrationtoolsPlugin(
|
class CalibrationtoolsPlugin(
|
||||||
octoprint.plugin.StartupPlugin,
|
octoprint.plugin.StartupPlugin,
|
||||||
octoprint.plugin.TemplatePlugin,
|
octoprint.plugin.TemplatePlugin,
|
||||||
@@ -32,7 +33,7 @@ class CalibrationtoolsPlugin(
|
|||||||
self.collectCommand = False
|
self.collectCommand = False
|
||||||
|
|
||||||
def on_after_startup(self):
|
def on_after_startup(self):
|
||||||
self._logger.debug("----------------[ CalibrationTools ]----------------")
|
self._logger.debug("---------------[ CalibrationTools ]---------------")
|
||||||
self.data = self.getModel()
|
self.data = self.getModel()
|
||||||
self.collectCommand = True
|
self.collectCommand = True
|
||||||
self._printer.commands("M92")
|
self._printer.commands("M92")
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ class API(octoprint.plugin.SimpleApiPlugin):
|
|||||||
|
|
||||||
if command == CMD_SAVE_E_STEPS:
|
if command == CMD_SAVE_E_STEPS:
|
||||||
cmds = ["M92 E%(newESteps)s" % data, "M500"]
|
cmds = ["M92 E%(newESteps)s" % data, "M500"]
|
||||||
if self.
|
|
||||||
cmds = cmds + ["M104 S0"]
|
cmds = cmds + ["M104 S0"]
|
||||||
self._printer.commands()
|
self._printer.commands()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user