1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-29 17:19:50 +02:00

Fixed problem when converting a TMC2208 machine

This commit is contained in:
Mitch Bradley
2022-02-08 09:39:26 -10:00
parent df93271386
commit 69499322da
2 changed files with 4 additions and 4 deletions

View File

@@ -71,6 +71,7 @@ namespace Motors {
init_step_dir_pins(); // from StandardStepper
config_message();
#ifndef NATIVE
tmcstepper->begin();
_has_errors = !test(); // Try communicating with motor. Prints an error if there is a problem.
@@ -96,6 +97,7 @@ namespace Motors {
// core
);
}
#endif
}
/*

View File

@@ -32,11 +32,9 @@ def convertMachine(baseName, verbose=True, extraArgs=None):
if app.returncode == 0:
cmd = [ '.pio/build/' + pioEnv + '/program' ]
out_filename = "yaml/" + Path(baseName).stem + ".yaml"
proc = subprocess.run(cmd, env=env, stdout=open(out_filename, "w"), bufsize=1)
proc = subprocess.run(cmd, env=env, stdout=open(out_filename, "w"), stderr=subprocess.STDOUT, bufsize=1)
print("FluidNC Configuration written to", out_filename)
# Sometimes proc.returncode seems to be 245 even when things are okay,
# so we just return 0.
return 0
return proc.returncode
else:
out_filename = "yaml/" + Path(baseName).stem + ".ERROR"
open(out_filename, "w")