From 921507682f3f759488368a063266aabadac5f7e2 Mon Sep 17 00:00:00 2001
From: Malaurie Bernard <mbernard@kinouby>
Date: Wed, 9 Aug 2023 15:09:32 +0200
Subject: [PATCH] Using lamda functions to match our new ESPUI modifications
 (which includes deletion of void* parameters in callbacks methods)

---
 web.cpp |  97 ++++++++++++++++++++++----------------------
 web.h   | 124 ++++++++++++++++++++++++++++----------------------------
 2 files changed, 111 insertions(+), 110 deletions(-)

diff --git a/web.cpp b/web.cpp
index e8003a0..66c2653 100644
--- a/web.cpp
+++ b/web.cpp
@@ -36,12 +36,13 @@ void Web :: web_setup()
     //***Syringe-pump***//
     status_syringe_pump = ESPUI.label("Etat du pousse-seringue :", ControlColor::None, "A l'arrêt");
 
-    stop_syringe_pump = ESPUI.addControl(ControlType::Button, "Mise en marche", "\u26D4", ControlColor::None, status_syringe_pump, stop_syringe_pump_callback, (void*)19);
+    stop_syringe_pump = ESPUI.addControl(ControlType::Button, "Mise en marche", "\u26D4", ControlColor::None, status_syringe_pump, [&](Control* sender, int value){stop_syringe_pump_callback(sender, value);});
+
 
     //***Syringe-filled***//
     status_syringe_filled_placement = ESPUI.label("Etat de la seringue :", ControlColor::None, "Enlevée");
 
-    syringe_filled_placement = ESPUI.addControl(ControlType::Switcher, "Mise en marche", "Arrêt", ControlColor::None, status_syringe_filled_placement, syringe_filled_placement_callback, (void*)19);
+    syringe_filled_placement = ESPUI.addControl(ControlType::Switcher, "Mise en marche", "Arrêt", ControlColor::None, status_syringe_filled_placement,[&](Control* sender, int value){syringe_filled_placement_callback(sender, value);});
 
     ESPUI.addControl(ControlType::Separator, "", "", ControlColor::None);
 
@@ -49,14 +50,14 @@ void Web :: web_setup()
     status_limit_switch = ESPUI.label("Etat du capteur de fin de course:", ControlColor::None, "Off");
 
     //***Initialisation***//
-    calibration = ESPUI.button("Callibration", calibration_callback, ControlColor::None, "\u21E4");
+    calibration = ESPUI.button("Callibration", [&](Control* sender, int value){calibration_callback(sender, value);}, ControlColor::None, "\u21E4");
 
-    fast_backward = ESPUI.button("Initialisation", fast_backward_callback, ControlColor::None, "\u2BC7 \u2BC7");
-    slow_backward = ESPUI.addControl(ControlType::Button, "Initialisation", "\u2BC7", ControlColor::None, fast_backward, slow_backward_callback);
-    slow_forward = ESPUI.addControl(ControlType::Button, "Initialisation", "\u2BC8", ControlColor::None, fast_backward, slow_forward_callback);
-    fast_forward =  ESPUI.addControl(ControlType::Button, "Initialisation", "\u2BC8 \u2BC8", ControlColor::None, fast_backward, fast_forward_callback);
+    fast_backward = ESPUI.button("Initialisation", [&](Control* sender, int value){fast_backward_callback(sender, value);}, ControlColor::None, "\u2BC7 \u2BC7");
+    slow_backward = ESPUI.addControl(ControlType::Button, "Initialisation", "\u2BC7", ControlColor::None, fast_backward, [&](Control* sender, int value){slow_backward_callback(sender, value);});
+    slow_forward = ESPUI.addControl(ControlType::Button, "Initialisation", "\u2BC8", ControlColor::None, fast_backward, [&](Control* sender, int value){slow_forward_callback(sender, value);});
+    fast_forward =  ESPUI.addControl(ControlType::Button, "Initialisation", "\u2BC8 \u2BC8", ControlColor::None, fast_backward, [&](Control* sender, int value){fast_forward_callback(sender, value);});
 
-    confirm_initialisation = ESPUI.button("Valider l'initialisation", confirm_initialisation_callback, ControlColor::None, "\u2714");
+    confirm_initialisation = ESPUI.button("Valider l'initialisation", [&](Control* sender, int value){confirm_initialisation_callback(sender, value);}, ControlColor::None, "\u2714");
 
 
 
@@ -65,31 +66,31 @@ void Web :: web_setup()
 
     //Exchange_values_wanted
     initial_volume_mL_label =ESPUI.addControl( ControlType::Label, "Caractéristiques de la seringue : ", "Volume initial contenu dans la seringue : ", ControlColor::None);
-    initial_volume_mL =  ESPUI.addControl( ControlType::Number, "Volume initial contenu dans la seringue : ", "0", ControlColor::None, initial_volume_mL_label, initial_volume_mL_callback, (void*)19);
+    initial_volume_mL =  ESPUI.addControl( ControlType::Number, "Volume initial contenu dans la seringue : ", "0", ControlColor::None, initial_volume_mL_label, [&](Control* sender, int value){initial_volume_mL_callback(sender, value);});
     number_max_min(0, 500, initial_volume_mL);
 
     volume_exchange_mL_label = ESPUI.addControl(ControlType::Label, "Configuration de l'échange", "Volume à échanger en mL", ControlColor::None, initial_volume_mL_label);
-    volume_exchange_mL = ESPUI.addControl(ControlType::Number,"Configuration de l'échange", "0", ControlColor::None, initial_volume_mL_label, volume_exchange_mL_callback, (void*)19);
+    volume_exchange_mL = ESPUI.addControl(ControlType::Number,"Configuration de l'échange", "0", ControlColor::None, initial_volume_mL_label, [&](Control* sender, int value){volume_exchange_mL_callback(sender, value);});
     number_max_min(0, 500, volume_exchange_mL);
 
     exchange_throughtput_uL_per_sec_label = ESPUI.addControl(ControlType::Label, "Configuration de l'échange", "Débit de l'échange en uL/sec", ControlColor::None, initial_volume_mL_label);
-    exchange_throughtput_uL_per_sec = ESPUI.addControl(ControlType::Number,"Configuration de l'échange", "0", ControlColor::None, initial_volume_mL_label, exchange_throughtput_uL_per_sec_callback, (void*)19);
+    exchange_throughtput_uL_per_sec = ESPUI.addControl(ControlType::Number,"Configuration de l'échange", "0", ControlColor::None, initial_volume_mL_label, [&](Control* sender, int value){exchange_throughtput_uL_per_sec_callback(sender, value);});
     number_max_min(0, 500, exchange_throughtput_uL_per_sec);
 
     label_push_pull_choice = ESPUI.addControl(ControlType::Label, "Injection ou Aspiration", "Injection", ControlColor::None, initial_volume_mL_label);
-    switch_push_pull_choice = ESPUI.addControl(ControlType::Switcher, "Injection ou Aspiration", "Injection", ControlColor::None, initial_volume_mL_label, switch_push_pull_choice_callback, (void*)19);
+    switch_push_pull_choice = ESPUI.addControl(ControlType::Switcher, "Injection ou Aspiration", "Injection", ControlColor::None, initial_volume_mL_label, [&](Control* sender, int value){switch_push_pull_choice_callback(sender, value);});
     ESPUI.updateSwitcher(switch_push_pull_choice, true); //pour mettre a "Injection" par défaut au début
 
 
-    start_exchange = ESPUI.addControl(ControlType::Button, "Start exchange", "\xF0\x9F\x8F\x81", ControlColor::None, initial_volume_mL_label, start_exchange_callback, (void*)19);
+    start_exchange = ESPUI.addControl(ControlType::Button, "Start exchange", "\xF0\x9F\x8F\x81", ControlColor::None, initial_volume_mL_label, [&](Control* sender, int value){start_exchange_callback(sender, value);});
 
 
     //Remaning_values
     label_remaining_volume_mL = ESPUI.label("Caractéristiques de l'échange en cours", ControlColor::None, "Volume restant en mL");
-    remaining_volume_mL = ESPUI.addControl(ControlType::Slider, "Volume", "0", ControlColor::None, label_remaining_volume_mL, remaining_volume_mL_callback, (void*)19);
+    remaining_volume_mL = ESPUI.addControl(ControlType::Slider, "Volume", "0", ControlColor::None, label_remaining_volume_mL, [&](Control* sender, int value){remaining_volume_mL_callback(sender, value);});
    
     label_remaining_time_sec = ESPUI.addControl( ControlType::Label, "Caractéristiques de l'échange en cours", "Temps restant en sec", ControlColor::None, label_remaining_volume_mL);
-    remaining_time_sec = ESPUI.addControl(ControlType::Slider, "Temps", "0", ControlColor::None, label_remaining_volume_mL, remaining_time_sec_callback, (void*)19);
+    remaining_time_sec = ESPUI.addControl(ControlType::Slider, "Temps", "0", ControlColor::None, label_remaining_volume_mL, [&](Control* sender, int value){remaining_time_sec_callback(sender, value);});
 
 
 
@@ -100,7 +101,7 @@ void Web :: web_setup()
 
     //Choice_of_syringe_model
 
-    syringe_selection = ESPUI.addControl(ControlType::Select, "Choix de la seringue :", "", ControlColor::None, configurations, syringe_selection_callback);
+    syringe_selection = ESPUI.addControl(ControlType::Select, "Choix de la seringue :", "", ControlColor::None, configurations, [&](Control* sender, int value){syringe_selection_callback(sender, value);});
     select_syringe_maj(configurations);
 
     syringe_volume_mL_value = 5;
@@ -112,7 +113,7 @@ void Web :: web_setup()
     syringe_diameter_mm =ESPUI.addControl( ControlType::Label, "Caractéristiques de la seringue : ", syringe_diameter_mm_string.c_str(), ControlColor::None, syringe_volume_mL);
 
 
-    choose_syringe = ESPUI.addControl(ControlType::Button, "Choisir cette seringue", "\u2714", ControlColor::None, syringe_selection, choose_syringe_callback, (void*)19);
+    choose_syringe = ESPUI.addControl(ControlType::Button, "Choisir cette seringue", "\u2714", ControlColor::None, syringe_selection, [&](Control* sender, int value){choose_syringe_callback(sender, value);});
   
     select_value = "BD_10mL";
 
@@ -122,35 +123,35 @@ void Web :: web_setup()
 
     //New_syringe
     name_new_syringe_label = ESPUI.addControl(ControlType::Label, "Nouvelle seringue", "Nom de la seringue :", ControlColor::None, new_syringe);
-    name_new_syringe = ESPUI.addControl(ControlType::Text, "Nouvelle seringue", "", ControlColor::None, name_new_syringe_label, name_new_syringe_callback);
+    name_new_syringe = ESPUI.addControl(ControlType::Text, "Nouvelle seringue", "", ControlColor::None, name_new_syringe_label, [&](Control* sender, int value){name_new_syringe_callback(sender, value);});
     
     internal_diameter_mm_new_syringe_label =ESPUI.addControl(ControlType::Label, "Nouvelle seringue", "Diamètre interne de la seringue en mm :", ControlColor::None, name_new_syringe_label);
-    internal_diameter_mm_new_syringe = ESPUI.addControl(ControlType::Number, "Diamètre interne de la seringue en mm", "5", ControlColor::None, name_new_syringe_label, internal_diameter_mm_new_syringe_callback);
+    internal_diameter_mm_new_syringe = ESPUI.addControl(ControlType::Number, "Diamètre interne de la seringue en mm", "5", ControlColor::None, name_new_syringe_label, [&](Control* sender, int value){internal_diameter_mm_new_syringe_callback(sender, value);});
     internal_diameter_mm_new_syringe_value = 5;
     number_max_min(0, 500, internal_diameter_mm_new_syringe);
 
     total_volume_mL_new_syringe_label =ESPUI.addControl(ControlType::Label, "Nouvelle seringue", "Volume total de la seringue en mL :", ControlColor::None, name_new_syringe_label);
-    total_volume_mL_new_syringe = ESPUI.addControl(ControlType::Number, "Volume total de la seringue en mL", "5", ControlColor::None, name_new_syringe_label, total_volume_mL_new_syringe_callback);
+    total_volume_mL_new_syringe = ESPUI.addControl(ControlType::Number, "Volume total de la seringue en mL", "5", ControlColor::None, name_new_syringe_label, [&](Control* sender, int value){total_volume_mL_new_syringe_callback(sender, value);});
     total_volume_mL_new_syringe_value = 5;
     number_max_min(0, 500, total_volume_mL_new_syringe);
 
     ESPUI.addControl(ControlType::Separator, "Je suis là", "", ControlColor::None, name_new_syringe_label);
 
-    add_syringe = ESPUI.addControl(ControlType::Button, "Ajouter la seringue", "\u2714", ControlColor::None, new_syringe, add_syringe_callback, (void*)19);
+    add_syringe = ESPUI.addControl(ControlType::Button, "Ajouter la seringue", "\u2714", ControlColor::None, new_syringe, [&](Control* sender, int value){add_syringe_callback(sender, value);});
 
 
     //Features
-    syringe_pump_length_mm_value  = ESPUI.addControl(ControlType::Number, "Longueur totale du pousse-seringue", "50", ControlColor::None, features, syringe_pump_length_mm_callback);
+    syringe_pump_length_mm_value  = ESPUI.addControl(ControlType::Number, "Longueur totale du pousse-seringue", "50", ControlColor::None, features, [&](Control* sender, int value){syringe_pump_length_mm_callback(sender, value);});
     
-    lead_screw_pitch_mm = ESPUI.addControl(ControlType::Number, "Avance par tour", "0.7", ControlColor::None, features, number_callback);
+    lead_screw_pitch_mm = ESPUI.addControl(ControlType::Number, "Avance par tour", "0.7", ControlColor::None, features, [&](Control* sender, int value){number_callback(sender, value);});
     
     clockwise_equals_push_label = ESPUI.addControl(ControlType::Label, "Sens de rotation du moteur", "Horaire = Injection", ControlColor::None, features);
-    clockwise_equals_push = ESPUI.addControl(ControlType::Switcher, "Sens de rotation du moteur", "Horaire =", ControlColor::None, clockwise_equals_push_label, clockwise_equals_push_callback);
+    clockwise_equals_push = ESPUI.addControl(ControlType::Switcher, "Sens de rotation du moteur", "Horaire =", ControlColor::None, clockwise_equals_push_label, [&](Control* sender, int value){clockwise_equals_push_callback(sender, value);});
     ESPUI.updateSwitcher(clockwise_equals_push, true); //set "Horaire = Injection" at the beginning
 
-    microstep_configuration = ESPUI.addControl(ControlType::Number, "Configuration Hardware des microsteps", "16", ControlColor::None, features, microstep_configuration_callback);
+    microstep_configuration = ESPUI.addControl(ControlType::Number, "Configuration Hardware des microsteps", "16", ControlColor::None, features, [&](Control* sender, int value){microstep_configuration_callback(sender, value);});
 
-    motor_steps = ESPUI.addControl(ControlType::Number, "Caractéristique du moteur (nombre de pas possibles ?)", "2000", ControlColor::None, features, motor_steps_callback);
+    motor_steps = ESPUI.addControl(ControlType::Number, "Caractéristique du moteur (nombre de pas possibles ?)", "2000", ControlColor::None, features,[&](Control* sender, int value){motor_steps_callback(sender, value);});
 
 
     
@@ -182,13 +183,13 @@ void Web :: number_callback(Control* sender, int type)
 
 //***ABOVE***//
 
-void Web :: stop_syringe_pump_callback (Control* sender, int value, void* param)
+void Web :: stop_syringe_pump_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Linking the switch of the syringe pump status and the actions.
 ***/
-{(void)param; //Avoid the unused Warning
+{
     style_syringe_pump_off();
 
     Serial.println("Syringe_pump stopped");
@@ -197,13 +198,13 @@ void Web :: stop_syringe_pump_callback (Control* sender, int value, void* param)
 
 }
 
-void Web :: syringe_filled_placement_callback (Control* sender, int value, void* param)
+void Web :: syringe_filled_placement_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Linking the switch of the syringe filled status(placed or not) and the actions.
 ***/
-{(void)param; //Avoid the unused Warning
+{
     switch (value)
     {
     case S_ACTIVE:
@@ -378,13 +379,13 @@ void Web :: confirm_initialisation_callback (Control *sender, int type)
 }
 
 
-void Web :: volume_exchange_mL_callback (Control* sender, int value, void* param)
+void Web :: volume_exchange_mL_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Enable to choose the volume that woud be exchanged.
 ***/
-{(void)param; //Avoid the unused Warning
+{
 
     syringe_filled.set_exchange_volume_mL(atof(sender->value.c_str()));
     syringe_filled.write_Json ();
@@ -398,13 +399,13 @@ void Web :: volume_exchange_mL_callback (Control* sender, int value, void* param
     
 }
 
-void Web :: exchange_throughtput_uL_per_sec_callback (Control* sender, int value, void* param)
+void Web :: exchange_throughtput_uL_per_sec_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Enable to choose the volume that woud be exchanged.
 ***/
-{(void)param; //Avoid the unused Warning
+{
     syringe_filled.set_exchange_throughput_uL_per_sec(atof(sender->value.c_str()));
     syringe_filled.write_Json ();
 
@@ -417,14 +418,14 @@ void Web :: exchange_throughtput_uL_per_sec_callback (Control* sender, int value
 }
 
 
-void Web :: switch_push_pull_choice_callback (Control* sender, int value, void* param)
+void Web :: switch_push_pull_choice_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Change the label_push_pull_choice to display the choice.
             Change the style of the controller involved.
 ***/
-{(void)param; //Avoid the unused Warning
+{
 
     switch (value)
     {
@@ -452,30 +453,30 @@ void Web :: switch_push_pull_choice_callback (Control* sender, int value, void*
     Serial.println("");
 }
 
-void Web :: remaining_volume_mL_callback (Control* sender, int value, void* param)
+void Web :: remaining_volume_mL_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Linking the display with the current volume remaining.
 ***/
-{(void)param; //Avoid the unused Warning
+{
     ESPUI.updateSlider(remaining_volume_mL, syringe_filled.get_remaining_volume_mL());
 }
 
 
-void Web :: remaining_time_sec_callback (Control* sender, int value, void* param)
+void Web :: remaining_time_sec_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Linking the display with the current time remaining for the exchange.
 ***/
-{(void)param; //Avoid the unused Warning
+{
     float remaining_time_sec_value = syringe_filled.get_remaining_volume_mL()/syringe_filled.get_exchange_throughput_uL_per_sec();
     ESPUI.updateSlider(remaining_time_sec, remaining_time_sec_value);
 }
 
-void Web :: start_exchange_callback (Control* sender, int value, void* param)
-{(void)param; //Avoid the unused Warning
+void Web :: start_exchange_callback (Control* sender, int value)
+{
 
     syringe_filled.start_exchange();
     style_syringe_pump_on();
@@ -486,8 +487,8 @@ void Web :: start_exchange_callback (Control* sender, int value, void* param)
 //configurations  = Configurations
 
 
-void Web :: initial_volume_mL_callback (Control* sender, int value, void* param)
-{(void)param; //Avoid the unused Warning
+void Web :: initial_volume_mL_callback (Control* sender, int value)
+{
     syringe_filled.set_remaining_volume_mL((sender->value).toFloat());
     syringe_filled.write_Json();
 
@@ -501,13 +502,13 @@ void Web :: initial_volume_mL_callback (Control* sender, int value, void* param)
 
 }
 
-void Web :: choose_syringe_callback (Control* sender, int value, void* param)
+void Web :: choose_syringe_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Print the value of the button state via the serial port.
 ***/
-{(void)param; //Avoid the unused Warning
+{
     switch (value)
     {
     case B_DOWN:
@@ -580,14 +581,14 @@ void Web :: internal_diameter_mm_new_syringe_callback(Control* sender, int type)
 
 }
 
-void Web :: add_syringe_callback (Control* sender, int value,  void* param)
+void Web :: add_syringe_callback (Control* sender, int value)
 /***
 -Argument : Pointer to the controller calling the function, integer according to the controller type.
 -Return   : /
 -Action   : Print the value of the button state via the serial port.
             Enable to save data in the syringe_json file.
 ***/
-{(void)param; //Avoid the unused Warning
+{
     switch (value)
     {
     case B_DOWN:
diff --git a/web.h b/web.h
index 96f7041..cc6bb20 100644
--- a/web.h
+++ b/web.h
@@ -19,122 +19,122 @@ class Web
 private :
 
 //Create tabs
-static uint16_t configurations, new_syringe, features;
+ uint16_t configurations, new_syringe, features;
 
 //***ABOVE***//
 
-static int status_syringe_pump;
-static uint16_t stop_syringe_pump;
+ int status_syringe_pump;
+ uint16_t stop_syringe_pump;
 
-static int status_syringe_filled_placement;
-static uint16_t syringe_filled_placement;
+ int status_syringe_filled_placement;
+ uint16_t syringe_filled_placement;
 
-static int status_limit_switch;
+ int status_limit_switch;
 
-static uint16_t calibration, fast_backward, fast_forward, slow_backward, slow_forward, confirm_initialisation;
+ uint16_t calibration, fast_backward, fast_forward, slow_backward, slow_forward, confirm_initialisation;
 
-static uint16_t volume_exchange_mL_label, volume_exchange_mL, exchange_throughtput_uL_per_sec_label, exchange_throughtput_uL_per_sec, label_push_pull_choice, switch_push_pull_choice, start_exchange;
+ uint16_t volume_exchange_mL_label, volume_exchange_mL, exchange_throughtput_uL_per_sec_label, exchange_throughtput_uL_per_sec, label_push_pull_choice, switch_push_pull_choice, start_exchange;
 
-static uint16_t label_remaining_volume_mL, label_remaining_time_sec;
-static uint16_t remaining_volume_mL, remaining_time_sec;
+ uint16_t label_remaining_volume_mL, label_remaining_time_sec;
+ uint16_t remaining_volume_mL, remaining_time_sec;
 
 //Configurations
-static uint16_t syringe_selection, syringe_ref, syringe_brand, syringe_volume_mL, syringe_diameter_mm, initial_volume_mL_label, initial_volume_mL, choose_syringe;
+ uint16_t syringe_selection, syringe_ref, syringe_brand, syringe_volume_mL, syringe_diameter_mm, initial_volume_mL_label, initial_volume_mL, choose_syringe;
 
-static float syringe_volume_mL_value, syringe_diameter_mm_value;
+ float syringe_volume_mL_value, syringe_diameter_mm_value;
 
-static std::string syringe_volume_mL_string, syringe_diameter_mm_string;
+ std::string syringe_volume_mL_string, syringe_diameter_mm_string;
 
 //New_syringe
-static uint16_t name_new_syringe, name_new_syringe_label, internal_diameter_mm_new_syringe, internal_diameter_mm_new_syringe_label, total_volume_mL_new_syringe, total_volume_mL_new_syringe_label, add_syringe, add_syringe_label;
-static String name_new_syringe_value, total_volume_mL_new_syringe_value, internal_diameter_mm_new_syringe_value;
+ uint16_t name_new_syringe, name_new_syringe_label, internal_diameter_mm_new_syringe, internal_diameter_mm_new_syringe_label, total_volume_mL_new_syringe, total_volume_mL_new_syringe_label, add_syringe, add_syringe_label;
+ String name_new_syringe_value, total_volume_mL_new_syringe_value, internal_diameter_mm_new_syringe_value;
 
 //Features
-static uint16_t syringe_pump_length_mm_value;
-static uint16_t lead_screw_pitch_mm, clockwise_equals_push_label, clockwise_equals_push, microstep_configuration, motor_steps;
+ uint16_t syringe_pump_length_mm_value;
+ uint16_t lead_screw_pitch_mm, clockwise_equals_push_label, clockwise_equals_push, microstep_configuration, motor_steps;
 
 
 //Other
-static String select_value;
+ String select_value;
 
-static char couleur1[30], couleur2[30], couleur3[30], couleur4[30], couleur5[30], couleur6[30], couleur7[30], couleur8[30], couleur9[30], couleur10[30];
+ char couleur1[30], couleur2[30], couleur3[30], couleur4[30], couleur5[30], couleur6[30], couleur7[30], couleur8[30], couleur9[30], couleur10[30];
 
-static long unsigned last_time;
+ long unsigned last_time;
 
 // Couleurs à utiliser
-static const char* couleurs[10];
+ const char* couleurs[10];
 
 
 
 public :
 
-static void web_setup();
-static void web_loop();
+ void web_setup();
+ void web_loop();
 
 
 /************CALLBACK_METHODS****************/
 
 //GENERAL CALLBACKS//
-static void number_callback(Control* sender, int type);
+ void number_callback(Control* sender, int type);
 
 //SPECIFIC CALLBACKS//
 
 //***ABOVE***//
-static void stop_syringe_pump_callback (Control* sender, int value, void* param);
-static void syringe_filled_placement_callback (Control* sender, int value, void* param);
-static void calibration_callback(Control* sender, int type);
-static void fast_backward_callback (Control *sender, int type);
-static void fast_forward_callback (Control *sender, int type);
-static void slow_backward_callback (Control *sender, int type);
-static void slow_forward_callback (Control *sender, int type);
-static void confirm_initialisation_callback (Control *sender, int type);
-static void volume_exchange_mL_callback (Control* sender, int value, void* param);
-static void exchange_throughtput_uL_per_sec_callback (Control* sender, int value, void* param);
-static void switch_push_pull_choice_callback (Control* sender, int value, void* param);
-static void remaining_volume_mL_callback (Control* sender, int value, void* param);
-static void remaining_time_sec_callback (Control* sender, int value, void* param);
-static void start_exchange_callback (Control* sender, int value, void* param);
+ void stop_syringe_pump_callback (Control* sender, int value);
+ void syringe_filled_placement_callback (Control* sender, int value);
+ void calibration_callback(Control* sender, int type);
+ void fast_backward_callback (Control *sender, int type);
+ void fast_forward_callback (Control *sender, int type);
+ void slow_backward_callback (Control *sender, int type);
+ void slow_forward_callback (Control *sender, int type);
+ void confirm_initialisation_callback (Control *sender, int type);
+ void volume_exchange_mL_callback (Control* sender, int value);
+ void exchange_throughtput_uL_per_sec_callback (Control* sender, int value);
+ void switch_push_pull_choice_callback (Control* sender, int value);
+ void remaining_volume_mL_callback (Control* sender, int value);
+ void remaining_time_sec_callback (Control* sender, int value);
+ void start_exchange_callback (Control* sender, int value);
 
 //Configurations
-static void choose_syringe_callback (Control* sender, int value, void* param);
-static void initial_volume_mL_callback (Control* sender, int value, void* param);
+ void choose_syringe_callback (Control* sender, int value);
+ void initial_volume_mL_callback (Control* sender, int value);
 
-static void name_new_syringe_callback(Control* sender, int type);
-static void total_volume_mL_new_syringe_callback(Control* sender, int type);
-static void internal_diameter_mm_new_syringe_callback(Control* sender, int type);
-static void add_syringe_callback (Control* sender, int value, void* param);
+ void name_new_syringe_callback(Control* sender, int type);
+ void total_volume_mL_new_syringe_callback(Control* sender, int type);
+ void internal_diameter_mm_new_syringe_callback(Control* sender, int type);
+ void add_syringe_callback (Control* sender, int value);
 
 //features : Configurations avancées
-static void syringe_pump_length_mm_callback(Control* sender, int type);
-static void clockwise_equals_push_callback(Control* sender, int value);
-static void microstep_configuration_callback(Control* sender, int type);
-static void motor_steps_callback(Control* sender, int type);
+ void syringe_pump_length_mm_callback(Control* sender, int type);
+ void clockwise_equals_push_callback(Control* sender, int value);
+ void microstep_configuration_callback(Control* sender, int type);
+ void motor_steps_callback(Control* sender, int type);
 
 //
-static void syringe_selection_callback(Control* sender, int value);
+ void syringe_selection_callback(Control* sender, int value);
 
 
 
 //ON_OFF METHODS
-static void syringe_pump_on_off();
+ void syringe_pump_on_off();
 
 
 
 //STYLE_METHODS
-static void style (uint16_t id, int style);
-static void set_initial_style();
-static void set_theme(int theme);
-static void style_syringe_pump_on();
-static void style_syringe_pump_off();
-static void style_syringe_filled_placement_on();
-static void style_syringe_filled_placement_off();
-static void style_initialisation(int style_choice);
-static void style_exchange_configuration(int style_choice);
+ void style (uint16_t id, int style);
+ void set_initial_style();
+ void set_theme(int theme);
+ void style_syringe_pump_on();
+ void style_syringe_pump_off();
+ void style_syringe_filled_placement_on();
+ void style_syringe_filled_placement_off();
+ void style_initialisation(int style_choice);
+ void style_exchange_configuration(int style_choice);
 
 
 //OTHER_METHODS
-static void select_syringe_maj(uint16_t tab);
-static void number_max_min(int min, int max, uint16_t control);
-static void serial_print (String name, Control* sender);
+ void select_syringe_maj(uint16_t tab);
+ void number_max_min(int min, int max, uint16_t control);
+ void serial_print (String name, Control* sender);
 
 };
-- 
GitLab