Skip to content
Snippets Groups Projects
Commit f93c9f33 authored by Malaurie Bernard's avatar Malaurie Bernard
Browse files

Fixing the method stop() in motor so the motor can stop without keep on turning

parent 64ac0700
No related branches found
No related tags found
1 merge request!17Malaurie's work on UI + CLI interface + AccelStepper interface
......@@ -133,6 +133,8 @@ void Motor :: stop ()
{
#if !CORE_MOCK
cli();
stepper.setAcceleration(1e20);
stepper.moveTo(stepper.currentPosition());
stepper.stop();
sei();
#endif
......@@ -148,7 +150,7 @@ void Motor :: stay_here ()
#if !CORE_MOCK
cli();
stepper.setAcceleration(1e20);
stepper.moveTo(stepper.currentPosition()); // change target to here
stepper.moveTo(stepper.currentPosition()); // change target to here
set_accel_mm_per_sec_per_sec(_acceleration_mm_per_sec_per_sec);
sei();
#endif
......
......@@ -383,7 +383,7 @@ void switch_status_callback1(Control* sender, int value, void* param)
ESPUI.print(status_label_id1, "A l'arrêt");
ESPUI.setPanelStyle(status_label_id1, couleurs[2]);
ESPUI.setElementStyle(status_label_id1, couleurs[3]);
syringe_filled.stay_here();
syringe_filled.stop();
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment