diff --git a/syringefilled.cpp b/syringefilled.cpp index b278c73d02b96e80afdccc1eaeda156bf2cded8a..a643495161ec921bff9f84ec1898f2f9aabc2bc2 100644 --- a/syringefilled.cpp +++ b/syringefilled.cpp @@ -186,11 +186,11 @@ void SyringeFilled :: start_exchange() if (get_push()) //If we want to deliver some liquid { - move_mm_limit_switch(exchange_volume_mm3/section_mm2); + move_mm_limit_switch(_clockwise_equals_push? exchange_volume_mm3/section_mm2: -exchange_volume_mm3/section_mm2); } else //If we want to recover some liquid { - move_to_mm_limit_switch(exchange_volume_mm3/section_mm2); + move_to_mm_limit_switch(_clockwise_equals_push? -exchange_volume_mm3/section_mm2: exchange_volume_mm3/section_mm2); } @@ -213,7 +213,7 @@ void SyringeFilled :: go_to_zero() { set_speed_mm_per_sec(-1); reset_position(); - move_to_mm_limit_switch(-200); + move_to_mm_limit_switch(_clockwise_equals_push? -200: 200); } } @@ -264,7 +264,7 @@ if (get_emergency()) Serial.printf("EMERGENCY: running away slowly\n"); set_speed_mm_per_sec(-1); reset_position(); - move_to_mm_limit_switch(200); + move_to_mm_limit_switch(_clockwise_equals_push? 200: -200); } }