From 3982a36a770c048316b48be0b65399650fd1718a Mon Sep 17 00:00:00 2001 From: Malaurie Bernard <mbernard@kinouby> Date: Thu, 6 Jul 2023 11:25:20 +0200 Subject: [PATCH] Changing name of motor methods used in syringefilled.cpp --- motor.cpp | 2 +- motor.h | 2 +- syringefilled.cpp | 30 +++++++++++++++--------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/motor.cpp b/motor.cpp index 5becfda..f462c3d 100644 --- a/motor.cpp +++ b/motor.cpp @@ -111,7 +111,7 @@ void Motor :: move_to_step (int step) Serial.printf("# move to: %d step %g mm\n", step, step_to_mm(step)); } -void Motor :: moveToMm (float mm) +void Motor :: move_to_mm (float mm) /*** -Argument : distace in mm -Return : / diff --git a/motor.h b/motor.h index b6ee6c8..2f5714d 100644 --- a/motor.h +++ b/motor.h @@ -64,7 +64,7 @@ public: //MOVEMENTS void move_to_step (int step); - void moveToMm (float mm); + void move_to_mm (float mm); void stop (); void stay_here (); bool motor_is_running (); diff --git a/syringefilled.cpp b/syringefilled.cpp index 8fd865c..39ef443 100644 --- a/syringefilled.cpp +++ b/syringefilled.cpp @@ -151,12 +151,12 @@ float SyringeFilled :: move() float section_mm2 = M_PI*radius*radius; - setSpeedMmPerSec(get_exchange_throughput_uL_per_sec()/section_mm2); + set_speed_mm_per_sec(get_exchange_throughput_uL_per_sec()/section_mm2); - if (whereStep() == 0) //If we are putting the syringe for the first time + if (where_step() == 0) //If we are putting the syringe for the first time { - moveToMm(syringe_pump_length_mm - remaining_volume_mm3/section_mm2); + move_to_mm(syringe_pump_length_mm - remaining_volume_mm3/section_mm2); } else { @@ -164,11 +164,11 @@ float SyringeFilled :: move() if (get_push()) //If we want to deliver some liquid { - moveToMm(initial_position_mm + exchange_volume_mm3/section_mm2); + move_to_mm(initial_position_mm + exchange_volume_mm3/section_mm2); } else //If we want to recover some liquid { - moveToMm(initial_position_mm - exchange_volume_mm3/section_mm2); + move_to_mm(initial_position_mm - exchange_volume_mm3/section_mm2); } } @@ -186,8 +186,8 @@ void SyringeFilled :: go_to_zero() return; else { - resetPosition(); - moveToMm(-syringe_pump_length_mm); + reset_position(); + move_to_mm(-syringe_pump_length_mm); } } @@ -219,8 +219,8 @@ void SyringeFilled::manage_emergency (bool pressed, bool at_zero) { set_emergency(false); Serial.printf("EMERGENCY: released\n"); - stayHere(); - resetPosition(); //zero is here again + stay_here(); + reset_position(); //zero is here again Serial.printf("ZERO: reset\n"); } } @@ -236,9 +236,9 @@ void SyringeFilled::run_from_emergency() if (get_emergency()) { Serial.printf("EMERGENCY: running away slowly\n"); - setSpeedMmPerSec(-1); - resetPosition(); - moveToMm(syringe_pump_length_mm); + set_speed_mm_per_sec(-1); + reset_position(); + move_to_mm(syringe_pump_length_mm); } } @@ -276,9 +276,9 @@ void SyringeFilled :: show_configuration() -Action : Displays syringe filled attributes ***/ { - Motor::showConfiguration(); + Motor::show_configuration(); - auto step = whereStep(); + auto step = where_step(); Serial.printf("# push clockwise: %s\n" "# diameter: %g mm\n" @@ -296,7 +296,7 @@ void SyringeFilled :: show_configuration() get_remaining_volume_mL(), get_push()? "infuse": "withdraw", get_emergency(), - stepToMm(step)); + step_to_mm(step)); } //Example : File f = ({ InterruptLock lock; filesystem->open(filename, "w"); }); and the f becomes the argument output_stream -- GitLab