From 2f6dd5273eb96a54ca53ccfcc444252e8da04d81 Mon Sep 17 00:00:00 2001 From: Malaurie Bernard <mbernard@kinouby> Date: Tue, 4 Jul 2023 15:06:49 +0200 Subject: [PATCH] Implementation of the show_configuration method in syringefilled for the cli interface --- syringefilled.cpp | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/syringefilled.cpp b/syringefilled.cpp index daa7ed3..6d5693d 100644 --- a/syringefilled.cpp +++ b/syringefilled.cpp @@ -275,7 +275,33 @@ bool SyringeFilled :: check_configuration() } - - - +void SyringeFilled :: show_configuration() +/*** +-Argument : / +-Return : / +-Action : Displays syringe filled attributes +***/ +{ + Motor::showConfiguration(); + + auto step = whereStep(); + + Serial.printf("# push clockwise: %s\n" + "# diameter: %g mm\n" + "# capacity: %g uL\n" + "# rate: %g uL/s = %g mm/s\n" + "# volume remaining: %g uL (target)\n" + "# direction: %s\n" + "# emergency: %d\n" + "# current position: %g mm\n", + get_clockwise_equals_push()? "yes": "no", + get_id_syringe()->get_internal_diameter_mm(), + get_id_syringe()->get_total_volume_mL(), + get_exchange_throughput_uL_per_sec(), + volume_to_distance(get_exchange_throughput_uL_per_sec(), get_id_syringe()), + get_remaining_volume_mL(), + get_push()? "infuse": "withdraw", + get_emergency(), + stepToMm(step)); +} -- GitLab