From 864a3dddce0fee0a8940bf63f903f818ad0952b5 Mon Sep 17 00:00:00 2001 From: Malaurie Bernard <mbernard@kinouby> Date: Mon, 3 Jul 2023 13:08:03 +0200 Subject: [PATCH] Changing the type of id_syringe from int* to Syringe*. --- syringefilled.cpp | 8 ++++---- syringefilled.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/syringefilled.cpp b/syringefilled.cpp index 808193a..c3452fc 100644 --- a/syringefilled.cpp +++ b/syringefilled.cpp @@ -27,7 +27,7 @@ void SyringeFilled :: set_push(bool push) SyringeFilledJSON["push"] = push; } -void SyringeFilled :: set_id_syringe(int* id_syringe){ +void SyringeFilled :: set_id_syringe(Syringe* id_syringe){ SyringeFilledJSON["id_syringe"] = id_syringe; } @@ -63,9 +63,9 @@ bool SyringeFilled :: get_push() return SyringeFilledJSON["push"].as<bool>(); } -int* SyringeFilled :: get_id_syringe() +Syringe* SyringeFilled :: get_id_syringe() { - return SyringeFilledJSON["id_syringe"].as<int*>(); + return SyringeFilledJSON["id_syringe"].as<Syringe*>(); } float SyringeFilled :: get_screw_thread_mm() @@ -80,7 +80,7 @@ bool SyringeFilled :: get_clockwise_equals_forward() -void SyringeFilled :: setupJsonSyringeFilled(float exchange_throughput_uL_per_sec, float exchange_volume_mL, float remaining_volume_mL, bool push, int* id_syringe, float screw_thread_mm, bool clockwise_equals_forward) +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) { //ADD INITIALISATION VALUES TO THE DOC diff --git a/syringefilled.h b/syringefilled.h index 49aacc7..bc65082 100644 --- a/syringefilled.h +++ b/syringefilled.h @@ -22,7 +22,7 @@ class SyringeFilled : Motor bool _push; //false means pull //Syringe - int* _id_syringe; //Not sure how to manage it + Syringe* _id_syringe; //Not sure how to manage it //Pump-Syringe float _screw_thread_mm; @@ -42,7 +42,7 @@ class SyringeFilled : Motor void set_exchange_volume_mL(float exchange_volume_mL); void set_remaining_volume_mL(float remaining_volume_mL); void set_push(bool push); - void set_id_syringe(int* id_syringe); + 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); @@ -52,7 +52,7 @@ class SyringeFilled : Motor float get_exchange_volume_mL(); float get_remaining_volume_mL(); bool get_push(); - int* get_id_syringe(); + Syringe* get_id_syringe(); float get_screw_thread_mm(); bool get_clockwise_equals_forward(); -- GitLab