From 972b742008eea252b738cbacb6448e6754b80aa4 Mon Sep 17 00:00:00 2001 From: Malaurie Bernard <mbernard@kinouby> Date: Tue, 4 Jul 2023 14:02:57 +0200 Subject: [PATCH] add emergency atribut (for the cli interface) --- syringefilled.cpp | 11 ++++++++++- syringefilled.h | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/syringefilled.cpp b/syringefilled.cpp index 790fba9..9dd5662 100644 --- a/syringefilled.cpp +++ b/syringefilled.cpp @@ -38,7 +38,12 @@ void SyringeFilled :: set_screw_thread_mm(float screw_thread_mm) void SyringeFilled :: set_clockwise_equals_forward(bool clockwise_equals_forward) { - SyringeFilledJSON["clockwise_equals_forward"] = clockwise_equals_forward; + SyringeFilledJSON["clockwise_equals_push"] = clockwise_equals_push; +} + +void SyringeFilled :: set_emergency(bool emergency) +{ + SyringeFilledJSON["emergency"] = emergency; } @@ -78,6 +83,10 @@ bool SyringeFilled :: get_clockwise_equals_forward() return SyringeFilledJSON["clockwise_equals_forward"].as<float>(); } +bool SyringeFilled :: get_emergency() +{ + return SyringeFilledJSON["emergency"].as<bool>(); +} void SyringeFilled :: setupJsonSyringeFilled(float exchange_throughput_uL_per_sec, float exchange_volume_mL, float remaining_volume_mL, bool push, Syringe* id_syringe, float screw_thread_mm, bool clockwise_equals_forward) diff --git a/syringefilled.h b/syringefilled.h index 8cf227f..924b2b5 100644 --- a/syringefilled.h +++ b/syringefilled.h @@ -32,6 +32,8 @@ class SyringeFilled : public Motor bool _clockwise_equals_forward; + //Limit_Switch + bool _emergency; public : /* @@ -48,6 +50,7 @@ class SyringeFilled : public Motor void set_id_syringe(Syringe* id_syringe); void set_screw_thread_mm(float screw_thread_mm); void set_clockwise_equals_forward(bool clockwise_equals_forward); + void set_emergency(bool emergency); //GET METHODS @@ -57,7 +60,8 @@ class SyringeFilled : public Motor bool get_push(); Syringe* get_id_syringe(); float get_screw_thread_mm(); - bool get_clockwise_equals_forward(); + bool get_clockwise_equals_push(); + bool get_emergency(); //JSON DOCUMENT -- GitLab