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

Code edditing

parent 4e79ac65
No related branches found
No related tags found
1 merge request!17Malaurie's work on UI + CLI interface + AccelStepper interface
...@@ -113,7 +113,7 @@ void Motor :: move_to_step (int step) ...@@ -113,7 +113,7 @@ void Motor :: move_to_step (int step)
void Motor :: move_to_mm (float mm) void Motor :: move_to_mm (float mm)
/*** /***
-Argument : distace in mm -Argument : distance in mm
-Return : / -Return : /
-Action : Move to the distance required. -Action : Move to the distance required.
***/ ***/
......
...@@ -89,6 +89,7 @@ int rpming = 0; // -1, 0 or +1 ...@@ -89,6 +89,7 @@ int rpming = 0; // -1, 0 or +1
SyringeFilled syringefilled(stepper); SyringeFilled syringefilled(stepper);
Cli console(syringe_filled); Cli console(syringe_filled);
const char* oledMode () const char* oledMode ()
{ {
switch (mode) switch (mode)
...@@ -362,7 +363,9 @@ void loop() ...@@ -362,7 +363,9 @@ void loop()
syringe_filled.manage_emergency(bEmergency.pressed(), !!stepper.distanceToGo()); syringe_filled.manage_emergency(bEmergency.pressed(), !!stepper.distanceToGo());
Serial.printf("%sEmergency=%u (remaining steps = %lu)\n", msgHeader, bEmergency.pressed(), stepper.distanceToGo()); Serial.printf("%sEmergency=%u (remaining steps = %lu)\n", msgHeader, bEmergency.pressed(), stepper.distanceToGo());
} }
//Code pour les boutons de l'écran
#if CORE_MOCK #if CORE_MOCK
bool changeA = false; bool changeA = false;
bool changeB = false; bool changeB = false;
......
...@@ -322,6 +322,9 @@ void SyringeFilled :: show_configuration() ...@@ -322,6 +322,9 @@ void SyringeFilled :: show_configuration()
step_to_mm(step)); step_to_mm(step));
} }
//JSON
//Example : File f = ({ InterruptLock lock; filesystem->open(filename, "w"); }); and the f becomes the argument input_stream //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 //useful in web.cpp via a button to save data
void SyringeFilled :: write_Json () void SyringeFilled :: write_Json ()
......
...@@ -58,7 +58,7 @@ void web_setup () ...@@ -58,7 +58,7 @@ void web_setup ()
choose_syringe = ESPUI.addControl(ControlType::Button, "Choisir cette seringue", "Utiliser cette seringue", ControlColor::None, syringe_selection, choose_syringe_callback, (void*)19); choose_syringe = ESPUI.addControl(ControlType::Button, "Choisir cette seringue", "Utiliser cette seringue", ControlColor::None, syringe_selection, choose_syringe_callback, (void*)19);
ESPUI.addControl(ControlType::Separator, "", "", ControlColor::None, configurations); ESPUI.addControl(ControlType::Separator, "", "", ControlColor::None, configurations);
//Volume_exchange_wanted //Volume_exchange_wanted
volume_exchange_mL = ESPUI.addControl(ControlType::Number,"Choix du volume à echanger en mL", "", ControlColor::None, configurations, volume_exchange_mL_callback, (void*)19); volume_exchange_mL = ESPUI.addControl(ControlType::Number,"Choix du volume à echanger en mL", "", ControlColor::None, configurations, volume_exchange_mL_callback, (void*)19);
...@@ -475,9 +475,9 @@ void set_init_style() ...@@ -475,9 +475,9 @@ void set_init_style()
style (initialisation, 2); style (initialisation, 2);
style (volume_exchange_mL, 3); style (volume_exchange_mL, 1);
style (label_push_pull_choice, 3); style (label_push_pull_choice, 1);
style (switch_push_pull_choice, 3); style (switch_push_pull_choice, 1);
style (label_remaining_volume_mL, 3); style (label_remaining_volume_mL, 3);
......
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