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

-Working on the seect update (does not completely work : some name does not appears every time)

-Put back the update slider function (which des not work neither)
parent e4abedc9
No related branches found
No related tags found
1 merge request!17Malaurie's work on UI + CLI interface + AccelStepper interface
......@@ -359,7 +359,7 @@ void add_syringe_callback (Control* sender, int value, void* param)
syringe.set_syringe(name_new_syringe_value, total_volume_mL_new_syringe_value.toFloat(), internal_diameter_mm_new_syringe_value.toFloat());
syringe.write_Json();
select_syringe_maj(configurations);
ESPUI.addControl(ControlType::Option, name_new_syringe_value.c_str(), name_new_syringe_value.c_str(), ControlColor::None, syringe_selection);
break;
......@@ -587,6 +587,11 @@ void set_init_style()
style (clockwise_equals_push_label, 3);
style (clockwise_equals_push, 3);
//
style (syringe_selection, 3);
}
void set_theme(int theme)
......@@ -634,25 +639,28 @@ void select_syringe_maj(uint16_t tab)
for (JsonPair kv : root)
{
ESPUI.addControl(ControlType::Option, kv.key().c_str(), kv.key().c_str(), ControlColor::None, syringe_selection);
uint16_t choice = ESPUI.addControl(ControlType::Option, kv.key().c_str(), kv.key().c_str(), ControlColor::None, syringe_selection);
style (choice, 3);
}
style (syringe_selection, 3);
}
//WEB_LOOP//
void web_loop ()
{
//bool switchi = syringe.isRunning();
//bool a = syringe.isRunning();
if(millis() > last_time + 500) {
last_time = millis();
//UPDATES
syringe_filled.update_remaining_volume();
ESPUI.updateSlider(remaining_volume_mL, syringe_filled.step_to_mm(syringe_filled.where_step()*100/syringe_pump_length_mm));
//syringe_filled.update_remaining_volume();
if (syringe_filled.is_running())
syringe_pump_on();
......
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