Stop motor after rotor lock command

This commit is contained in:
Benjamin Vedder 2021-03-13 11:40:09 +01:00
parent 134c0bbd80
commit c869fa0e9f
1 changed files with 3 additions and 1 deletions

View File

@ -663,7 +663,7 @@ void terminal_process_string(char *str) {
sscanf(argv[2], "%f", &time);
sscanf(argv[3], "%f", &angle);
if (current > 0.0 && current <= mc_interface_get_configuration()->l_current_max &&
if (fabsf(current) <= mc_interface_get_configuration()->l_current_max &&
angle >= 0.0 && angle <= 360.0) {
if (time <= 1e-6) {
timeout_reset();
@ -683,6 +683,8 @@ void terminal_process_string(char *str) {
}
}
mc_interface_set_current(0.0);
commands_printf("Done\n");
}
} else {