修改驱动
This commit is contained in:
parent
002c586b14
commit
644c133326
|
@ -4,7 +4,7 @@
|
|||
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||
"C_Cpp_Runner.cStandard": "",
|
||||
"C_Cpp_Runner.cppStandard": "",
|
||||
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
|
||||
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat",
|
||||
"C_Cpp_Runner.useMsvc": false,
|
||||
"C_Cpp_Runner.warnings": [
|
||||
"-Wall",
|
||||
|
|
|
@ -299,6 +299,10 @@ void tmc2240_motor_set_angle(tmc2240_index_e index, int32_t angle)
|
|||
return;
|
||||
}
|
||||
|
||||
tmc->params.enable = FALSE;
|
||||
_tmc2240_enable(index, tmc->params.enable);
|
||||
tmc->motor.pulse_count = 0;
|
||||
|
||||
if (angle > 0)
|
||||
{
|
||||
tmc->params.direction = TMC2240_FORWARD;
|
||||
|
|
Loading…
Reference in New Issue