Commit e0c73e5f authored by Guillaume Arthaud's avatar Guillaume Arthaud
Browse files

min max slider

parent 58769314
......@@ -5,7 +5,7 @@
#include <ESPUI.h> // https://github.com/s00500/ESPUI
#include "common.h"
#include "syringe.h"
uint16_t status;
uint16_t button1;
......@@ -28,6 +28,7 @@ void buttonCallback(Control *sender, int type) {
switch (type) {
case B_DOWN:
Serial.println("Button DOWN");
syringe.push(1, 1);
break;
case B_UP:
......@@ -94,17 +95,23 @@ void webSetup ()
ESPUI.addControl(ControlType::Option, "10mL", "Opt3", ControlColor::Alizarin, select1);
ESPUI.addControl(ControlType::Option, "20mL", "Opt3", ControlColor::Alizarin, select1);
ESPUI.addControl(ControlType::Slider, "Select seringe diameter", "30mm", ControlColor::Alizarin, Control::noParent, &slider);
ESPUI.addControl(ControlType::Slider, "Select seringe diameter (mm)", "30", ControlColor::Alizarin, Control::noParent, &slider);
millisLabelId = ESPUI.addControl(ControlType::Label, "Millis:", "0", ControlColor::Emerald, Control::noParent);
switchOne = ESPUI.addControl(ControlType::Switcher, "Switch one", "", ControlColor::Alizarin, Control::noParent, &switchExample);
uint16_t constantFlow = ESPUI.addControl(ControlType::Slider, "Select a constant flow", "30mL/s", ControlColor::Alizarin, Control::noParent, &slider);
uint16_t constantFlow = ESPUI.addControl(ControlType::Slider, "Select a constant flow (mL/s)", "30", ControlColor::Alizarin, Control::noParent, &slider);
ESPUI.addControl(ControlType::Min, "", "0", ControlColor::None, constantFlow);
ESPUI.addControl(ControlType::Max, "", "30", ControlColor::None, constantFlow);
ESPUI.addControl(ControlType::Slider, "Select a seringe displacement distance", "100mm", ControlColor::Alizarin, Control::noParent, &slider);
ESPUI.addControl(ControlType::Slider, "Select a seringe displacement time", "100s", ControlColor::Alizarin, Control::noParent, &slider);
uint16_t displacementDistance = ESPUI.addControl(ControlType::Slider, "Select a seringe displacement distance (mm)", "100", ControlColor::Alizarin, Control::noParent, &slider);
ESPUI.addControl(ControlType::Min, "", "0", ControlColor::None, displacementDistance);
ESPUI.addControl(ControlType::Max, "", "100", ControlColor::None, displacementDistance);
uint16_t displacementTime = ESPUI.addControl(ControlType::Slider, "Select a seringe displacement time (s)", "100", ControlColor::Alizarin, Control::noParent, &slider);
ESPUI.addControl(ControlType::Min, "", "0", ControlColor::None, displacementTime);
ESPUI.addControl(ControlType::Max, "", "100", ControlColor::None, displacementTime);
button1 = ESPUI.addControl(ControlType::Button, "Actuate", "Press", ControlColor::Peterriver, Control::noParent, &buttonCallback);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment