From c85d9819c913f9e3700b26848f2dcd8a31ea1f8b Mon Sep 17 00:00:00 2001 From: Malaurie Bernard <mbernard@kinouby> Date: Fri, 4 Aug 2023 17:07:25 +0200 Subject: [PATCH] a few things i forgot in previus commits of today --- syringefilled.cpp | 2 ++ syringefilled.h | 8 ++++++-- web.cpp | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/syringefilled.cpp b/syringefilled.cpp index 29b3fec..17d7a65 100644 --- a/syringefilled.cpp +++ b/syringefilled.cpp @@ -261,6 +261,7 @@ void SyringeFilled::manage_emergency (bool pressed, bool at_zero) if (pressed) //if the limit switch is pressed { set_emergency(true); + write_Json(); if (at_zero) //if we are at te initialisation place { run_from_emergency(); @@ -274,6 +275,7 @@ void SyringeFilled::manage_emergency (bool pressed, bool at_zero) else { set_emergency(false); + write_Json(); Serial.printf("EMERGENCY: released\n"); stop(); reset_position(); //zero is here again diff --git a/syringefilled.h b/syringefilled.h index 8bef682..8d82917 100644 --- a/syringefilled.h +++ b/syringefilled.h @@ -59,9 +59,11 @@ class SyringeFilled : public Motor void set_remaining_volume_mL(float remaining_volume_mL); void set_push(bool push); void set_name_syringe(String name_syringe); - void set_screw_thread_mm(float screw_thread_mm); void set_clockwise_equals_push(bool clockwise_equals_push); + void set_lead_screw_pitch_mm(float lead_screw_pitch_mm); void set_syringe_pump_length_mm(float syringe_pump_length_mm); + void set_microstep_configuration(int microstep_configuration); + void set_motor_steps(int motor_steps); void set_emergency(bool emergency); @@ -71,9 +73,11 @@ class SyringeFilled : public Motor float get_remaining_volume_mL(); bool get_push(); String get_name_syringe(); - float get_screw_thread_mm(); bool get_clockwise_equals_push(); float get_syringe_pump_length_mm(); + float get_lead_screw_pitch_mm(); + int get_microstep_configuration(); + int get_motor_steps(); bool get_emergency(); const StaticJsonDocument<200>& get_syringe_filled_data(); diff --git a/web.cpp b/web.cpp index db4c0e3..4d3bc81 100644 --- a/web.cpp +++ b/web.cpp @@ -597,6 +597,7 @@ void syringe_pump_length_mm_callback(Control* sender, int type) -Argument : Pointer to the controller calling the function, integer according to the controller type. -Return : / -Action : Print the value of the number controller via the serial port. + Change the syringe_pump_length value ***/ { syringe_filled.set_syringe_pump_length_mm(sender->type); -- GitLab