diff --git a/fs.cpp b/fs.cpp index ce90f509830bc63c187a06f4617b58c5f1009e73..eb52b2a6bb0e08b4e5ec8b7e042ac92885350b84 100644 --- a/fs.cpp +++ b/fs.cpp @@ -82,7 +82,7 @@ void cat (const char* filename, Stream* out) } } } - +/* void testw (const char* filename, Stream* out) { if (filesystem) @@ -98,3 +98,4 @@ void testw (const char* filename, Stream* out) } } } +*/ \ No newline at end of file diff --git a/pousseseringue-arduino.cpp b/pousseseringue-arduino.cpp index a049e15296bf724cddc6beaccf0ddad13d04d8f8..25f779a887bc5e37cf2d0ea64ce872ea7fa17671 100644 --- a/pousseseringue-arduino.cpp +++ b/pousseseringue-arduino.cpp @@ -356,10 +356,11 @@ void setup() //Json - syringe_filled.read_Json(); - syringe.read_Json(); - + syringe_filled.load_json(); + syringe.load_json(); + syringe_filled.save_json(); + syringe.save_json(); } diff --git a/syringe.cpp b/syringe.cpp index 0ee087c3851e402b88adc16846c95e46fa5b7fe8..049fe44e6999a356e55eb89a423140b054b2048e 100644 --- a/syringe.cpp +++ b/syringe.cpp @@ -81,7 +81,7 @@ bool Syringe :: check_configuration(String name) //Example : File f = ({ InterruptLock lock; filesystem->open(filename, "w"); }); and the f becomes the argument input_stream //useful in web.cpp via a button to save data -void Syringe :: write_Json () +void Syringe :: save_json () /*** -Argument : input_stream (= serial or a file) -Return : / @@ -97,7 +97,7 @@ f.close(); } //useful in setup of pousse-seringue.cpp(to check at the begining what has already been saved) and web.cpp via a button to recover data -void Syringe :: read_Json () +void Syringe :: load_json () /*** -Argument : output_stream (= serial or a file) -Return : / diff --git a/syringe.h b/syringe.h index cd0c8623adc4ede4888f12578c6c11a6988cf462..16ae21158ef6ff4a04d22dfbe3bd85aeff0b630a 100644 --- a/syringe.h +++ b/syringe.h @@ -47,8 +47,8 @@ class Syringe bool check_configuration(String name); //JSON METHODS - void write_Json (); - void read_Json (); + void save_json (); + void load_json (); }; diff --git a/syringefilled.cpp b/syringefilled.cpp index c42f26fd419738704cd9e563d819a028ddf67197..7c51b7c1f81e915dc38cc3987533d0963c1b82e3 100644 --- a/syringefilled.cpp +++ b/syringefilled.cpp @@ -11,7 +11,7 @@ SyringeFilled syringe_filled(stepper); //CONSTRUCTORS SyringeFilled :: SyringeFilled (MotorHardware_t& stepper): Motor(stepper) { - set_exchange_throughput_uL_per_sec(1); + set_exchange_throughput_uL_per_min(1); set_exchange_volume_mL(1); set_remaining_volume_mL(1); set_push(true); @@ -30,9 +30,9 @@ SyringeFilled :: SyringeFilled (MotorHardware_t& stepper): Motor(stepper) //SET METHODS -void SyringeFilled :: set_exchange_throughput_uL_per_sec(float exchange_throughput_uL_per_sec) +void SyringeFilled :: set_exchange_throughput_uL_per_min(float exchange_throughput_uL_per_min) { - syringe_filled_json["exchange_throughput_uL_per_min"] = exchange_throughput_uL_per_sec; + syringe_filled_json["exchange_throughput_uL_per_min"] = exchange_throughput_uL_per_min; } void SyringeFilled :: set_exchange_volume_mL(float exchange_volume_mL) @@ -177,6 +177,8 @@ const StaticJsonDocument<200>& SyringeFilled :: get_syringe_filled_data() return syringe_filled_json; } + + //CONVERSIONS StaticJsonDocument<200> syringe_filled_json; //200 = RAM allocated to this document diff --git a/syringefilled.h b/syringefilled.h index 957a5239b9be8b62033df69c359dbd8cb4d383f3..dc8656791b1b29942ce36195f777c568f241da37 100644 --- a/syringefilled.h +++ b/syringefilled.h @@ -55,7 +55,7 @@ class SyringeFilled : public Motor SyringeFilled(MotorHardware_t& stepper); //SET METHODS - void set_exchange_throughput_uL_per_sec(float exchange_throughput_uL_per_sec); + void set_exchange_throughput_uL_per_min(float exchange_throughput_uL_per_min); void set_exchange_volume_mL(float exchange_volume_mL); void set_remaining_volume_mL(float remaining_volume_mL); void set_push(bool push); @@ -91,6 +91,7 @@ class SyringeFilled : public Motor + //CONVERSIONS float volume_mL_to_distance_mm(float volume_mL); float distance_mm_to_volume_mL(float distance_mm); //CLI diff --git a/web.cpp b/web.cpp index eb6c5ff9539cc61023db69177289cfa98001e8be..6b0118c416a456f75579626d603b407ce0e8910c 100644 --- a/web.cpp +++ b/web.cpp @@ -1,11 +1,8 @@ #include "web.h" - void Web :: web_setup() { - - HeapSelectIram abc; @@ -25,20 +22,17 @@ void Web :: web_setup() couleurs[9] = couleur10; - //Create tabs configurations = ESPUI.addControl(ControlType::Tab, "Configurations", "Configurations"); new_syringe = ESPUI.addControl(ControlType::Tab, "Nouvelle Seringue", "Nouvelle seringue"); features = ESPUI.addControl(ControlType::Tab, "Caracteristiques du pousse-seringue", "Caracteristiques du pousse-seringue"); //***ABOVE***// - //***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, [&](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");