mirror of https://github.com/rusefi/bldc.git
Stop motor after rotor lock command
This commit is contained in:
parent
134c0bbd80
commit
c869fa0e9f
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue