Skip to content
Snippets Groups Projects
Commit d1da7935 authored by David Gauchard's avatar David Gauchard
Browse files

Merge branch 'jal/develop' into 'master'

Changed the monitor and flash parameters in the .ini file

See merge request fablaas/pousseseringue/pousseseringue-arduino!4
parents 4718fccb ac9c3293
No related branches found
No related tags found
1 merge request!4Changed the monitor and flash parameters in the .ini file
......@@ -24,4 +24,7 @@ lib_deps =
adafruit/Adafruit GFX Library@^1.11.0
adafruit/Adafruit BusIO@^1.11.5
SPI
s00500/ESPUI@^2.0.0
monitor_speed = 74880
upload_speed = 921600
\ No newline at end of file
......@@ -17,13 +17,6 @@ void numberCall( Control* sender, int type ) {
Serial.println( sender->value );
}
void textCall(Control *sender, int type) {
Serial.print("Text: ID: ");
Serial.print(sender->id);
Serial.print(", Value: ");
Serial.println(sender->value);
}
void slider(Control *sender, int type) {
Serial.print("Slider: ID: ");
Serial.print(sender->id);
......@@ -63,61 +56,15 @@ void buttonExample(Control *sender, int type) {
}
}
void padExample(Control *sender, int value) {
switch (value) {
case P_LEFT_DOWN:
Serial.print("left down");
break;
case P_LEFT_UP:
Serial.print("left up");
break;
case P_RIGHT_DOWN:
Serial.print("right down");
break;
case P_RIGHT_UP:
Serial.print("right up");
break;
case P_FOR_DOWN:
Serial.print("for down");
break;
case P_FOR_UP:
Serial.print("for up");
break;
case P_BACK_DOWN:
Serial.print("back down");
break;
case P_BACK_UP:
Serial.print("back up");
break;
case P_CENTER_DOWN:
Serial.print("center down");
break;
case P_CENTER_UP:
Serial.print("center up");
break;
}
Serial.print(" ");
Serial.println(sender->id);
}
void switchExample(Control *sender, int value) {
switch (value) {
case S_ACTIVE:
Serial.print("Active:");
Serial.print("Tirer:");
break;
case S_INACTIVE:
Serial.print("Inactive");
Serial.print("Pousser");
break;
}
......@@ -132,22 +79,6 @@ void selectExample(Control *sender, int value) {
Serial.println(sender->value);
}
void otherSwitchExample(Control *sender, int value) {
switch (value) {
case S_ACTIVE:
Serial.print("Active:");
break;
case S_INACTIVE:
Serial.print("Inactive");
break;
}
Serial.print(" ");
Serial.println(sender->id);
}
void webSetup ()
{
......@@ -155,24 +86,26 @@ void webSetup ()
status = ESPUI.addControl(ControlType::Label, "Status:", "Stop", ControlColor::Turquoise);
uint16_t select1 = ESPUI.addControl(ControlType::Select, "Select:", "", ControlColor::Alizarin, Control::noParent, &selectExample);
uint16_t select1 = ESPUI.addControl(ControlType::Select, "Select the seringe volume:", "", ControlColor::Alizarin, Control::noParent, &selectExample);
ESPUI.addControl(ControlType::Option, "Option1", "Opt1", ControlColor::Alizarin, select1);
ESPUI.addControl(ControlType::Option, "Option2", "Opt2", ControlColor::Alizarin, select1);
ESPUI.addControl(ControlType::Option, "Option3", "Opt3", ControlColor::Alizarin, select1);
ESPUI.addControl(ControlType::Option, "1mL", "Opt1", ControlColor::Alizarin, select1);
ESPUI.addControl(ControlType::Option, "2mL", "Opt2", ControlColor::Alizarin, select1);
ESPUI.addControl(ControlType::Option, "5mL", "Opt3", ControlColor::Alizarin, select1);
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::Text, "Text Test:", "a Text Field", ControlColor::Alizarin, Control::noParent, &textCall);
millisLabelId = ESPUI.addControl(ControlType::Label, "Millis:", "0", ControlColor::Emerald, Control::noParent);
button1 = ESPUI.addControl(ControlType::Button, "Push Button", "Press", ControlColor::Peterriver, Control::noParent, &buttonCallback);
ESPUI.addControl(ControlType::Button, "Other Button", "Press", ControlColor::Wetasphalt, Control::noParent, &buttonExample);
ESPUI.addControl(ControlType::PadWithCenter, "Pad with center", "", ControlColor::Sunflower, Control::noParent, &padExample);
ESPUI.addControl(ControlType::Pad, "Pad without center", "", ControlColor::Carrot, Control::noParent, &padExample);
switchOne = ESPUI.addControl(ControlType::Switcher, "Switch one", "", ControlColor::Alizarin, Control::noParent, &switchExample);
ESPUI.addControl(ControlType::Switcher, "Switch two", "", ControlColor::None, Control::noParent, &otherSwitchExample);
ESPUI.addControl(ControlType::Slider, "Slider one", "30", ControlColor::Alizarin, Control::noParent, &slider);
ESPUI.addControl(ControlType::Slider, "Slider two", "100", ControlColor::Alizarin, Control::noParent, &slider);
ESPUI.addControl(ControlType::Number, "Number:", "50", ControlColor::Alizarin, Control::noParent, &numberCall);
ESPUI.addControl(ControlType::Slider, "Select a constant flow", "30mL/s", ControlColor::Alizarin, Control::noParent, &slider);
ESPUI.addControl(ControlType::Slider, "Select a given volume", "30mL", ControlColor::Alizarin, Control::noParent, &slider);
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);
button1 = ESPUI.addControl(ControlType::Button, "Actuate", "Press", ControlColor::Peterriver, Control::noParent, &buttonCallback);
/*
* .begin loads and serves all files from PROGMEM directly.
......
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