From c0c9ea5d84d3ad49a6acf1dcdeac683ac1dc1c11 Mon Sep 17 00:00:00 2001
From: Malaurie Bernard <mbernard@kinouby>
Date: Mon, 3 Jul 2023 10:09:17 +0200
Subject: [PATCH] Rename id to id_Syringe in class SyringeFilled to be more
 precise.

---
 syringefilled.cpp | 12 ++++++------
 syringefilled.h   |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/syringefilled.cpp b/syringefilled.cpp
index d854858..dc86063 100644
--- a/syringefilled.cpp
+++ b/syringefilled.cpp
@@ -23,8 +23,8 @@ void SyringeFilled :: set_push(bool push)
     SyringeFilledJSON["push"] = push;
 }
 
-void SyringeFilled :: set_id(int* id){
-    SyringeFilledJSON["id"] = id;
+void SyringeFilled :: set_id_syringe(int* id_syringe){
+    SyringeFilledJSON["id_syringe"] = id_syringe;
 }
 
 
@@ -49,14 +49,14 @@ bool SyringeFilled :: get_push()
     return SyringeFilledJSON["push"].as<bool>();
 }
 
-int* SyringeFilled :: get_id()
+int* SyringeFilled :: get_id_syringe()
 {
-    return SyringeFilledJSON["id"].as<int*>();
+    return SyringeFilledJSON["id_syringe"].as<int*>();
 }
 
 
 
-void SyringeFilled :: setupJsonSyringeFilled(float exchange_throughput_uL_per_sec, float exchange_volume_mL, float remaining_volume_mL, bool push, int* id)
+void SyringeFilled :: setupJsonSyringeFilled(float exchange_throughput_uL_per_sec, float exchange_volume_mL, float remaining_volume_mL, bool push, int* id_syringe)
 {
     
     //ADD INITIALISATION VALUES TO THE DOC
@@ -64,7 +64,7 @@ void SyringeFilled :: setupJsonSyringeFilled(float exchange_throughput_uL_per_se
     SyringeFilledJSON["exchange_volume_mL"] = exchange_volume_mL;
     SyringeFilledJSON["remaining_volume_mL"] = remaining_volume_mL;
     SyringeFilledJSON["push"] = push;
-    SyringeFilledJSON["id"] = SyringeJSON["id"];
+    SyringeFilledJSON["id_syringe"] = SyringeJSON["id"];
 
 
     //GENERATE THE MINIFIED JSON AND SEND IT TO THE SERIAL PORT
diff --git a/syringefilled.h b/syringefilled.h
index b06fdce..aa87d8e 100644
--- a/syringefilled.h
+++ b/syringefilled.h
@@ -13,7 +13,7 @@ class SyringeFilled : Motor
     float _exchange_volume_mL;
     float _remaining_volume_mL;
     bool _push;  //false means pull
-    int* _id;
+    int* _id_syringe;
 
 
     public :
@@ -23,7 +23,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(int* id);
+    void set_id_syringe(int* id_syringe);
 
 
     //GET METHODS
@@ -31,13 +31,13 @@ class SyringeFilled : Motor
     float get_exchange_volume_mL();
     float get_remaining_volume_mL();
     bool get_push();
-    int* get_id();
+    int* get_id_syringe();
 
 
     //JSON DOCUMENT
     StaticJsonDocument<200> SyringeFilledJSON;  //200 = RAM allocated to this document
 
-    void setupJsonSyringeFilled(float exchange_throughput_uL_per_sec, float exchange_volume_mL, float remaining_volume_mL, bool push, int* id);
+    void setupJsonSyringeFilled(float exchange_throughput_uL_per_sec, float exchange_volume_mL, float remaining_volume_mL, bool push, int* id_syringe);
 
 
 };
-- 
GitLab