Skip to content
Snippets Groups Projects
Commit 7f4b067e authored by Malaurie Bernard's avatar Malaurie Bernard
Browse files

Adding some save to json files

parent 70a638c6
No related branches found
No related tags found
1 merge request!17Malaurie's work on UI + CLI interface + AccelStepper interface
...@@ -408,7 +408,7 @@ void switch_push_pull_choice_callback (Control* sender, int value, void* param) ...@@ -408,7 +408,7 @@ void switch_push_pull_choice_callback (Control* sender, int value, void* param)
{ {
case S_ACTIVE: case S_ACTIVE:
syringe_filled.set_push(true); syringe_filled.set_push(true);
syringe_filled.write_Json ();
ESPUI.print(label_push_pull_choice, "Injection"); ESPUI.print(label_push_pull_choice, "Injection");
break; break;
...@@ -416,7 +416,7 @@ void switch_push_pull_choice_callback (Control* sender, int value, void* param) ...@@ -416,7 +416,7 @@ void switch_push_pull_choice_callback (Control* sender, int value, void* param)
case S_INACTIVE: case S_INACTIVE:
syringe_filled.set_push(false); syringe_filled.set_push(false);
syringe_filled.write_Json ();
ESPUI.print(label_push_pull_choice, "Aspiration"); ESPUI.print(label_push_pull_choice, "Aspiration");
break; break;
...@@ -467,6 +467,8 @@ void start_exchange_callback (Control* sender, int value, void* param) ...@@ -467,6 +467,8 @@ void start_exchange_callback (Control* sender, int value, void* param)
void initial_volume_mL_callback (Control* sender, int value, void* param) void initial_volume_mL_callback (Control* sender, int value, void* param)
{(void)param; //Avoid the unused Warning {(void)param; //Avoid the unused Warning
syringe_filled.set_remaining_volume_mL((sender->value).toFloat()); syringe_filled.set_remaining_volume_mL((sender->value).toFloat());
syringe_filled.write_Json();
serial_print ("syringe_initial_volume (sender->value)", sender); serial_print ("syringe_initial_volume (sender->value)", sender);
...@@ -594,6 +596,7 @@ void syringe_pump_length_mm_callback(Control* sender, int type) ...@@ -594,6 +596,7 @@ void syringe_pump_length_mm_callback(Control* sender, int type)
***/ ***/
{ {
syringe_filled.set_syringe_pump_length_mm(sender->type); syringe_filled.set_syringe_pump_length_mm(sender->type);
syringe_filled.write_Json();
serial_print ("syringe_pump_length (sender->value)", sender); serial_print ("syringe_pump_length (sender->value)", sender);
...@@ -615,12 +618,14 @@ void clockwise_equals_push_callback(Control* sender, int value) ...@@ -615,12 +618,14 @@ void clockwise_equals_push_callback(Control* sender, int value)
case S_ACTIVE: case S_ACTIVE:
syringe_filled.set_clockwise_equals_push(true); syringe_filled.set_clockwise_equals_push(true);
ESPUI.print(clockwise_equals_push_label, "Horaire = Injection"); ESPUI.print(clockwise_equals_push_label, "Horaire = Injection");
syringe_filled.write_Json();
break; break;
case S_INACTIVE: case S_INACTIVE:
syringe_filled.set_clockwise_equals_push(false); syringe_filled.set_clockwise_equals_push(false);
ESPUI.print(clockwise_equals_push_label, "Horaire = Aspiration"); ESPUI.print(clockwise_equals_push_label, "Horaire = Aspiration");
syringe_filled.write_Json();
break; break;
} }
...@@ -643,6 +648,7 @@ void syringe_selection_callback(Control* sender, int value) ...@@ -643,6 +648,7 @@ void syringe_selection_callback(Control* sender, int value)
select_value = sender->value; select_value = sender->value;
syringe_filled.set_name_syringe(select_value); syringe_filled.set_name_syringe(select_value);
syringe_filled.write_Json();
serial_print ("syringe_selection (sender->value)", sender); serial_print ("syringe_selection (sender->value)", sender);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment