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

code editting

parent f98d00cd
No related branches found
No related tags found
1 merge request!17Malaurie's work on UI + CLI interface + AccelStepper interface
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
extern const char* msgHeader; extern const char* msgHeader;
void web_setup ();
void web_loop ();
// A4988 PINOUT // A4988 PINOUT
#define DIR 15 // esp8266 gpio #define DIR 15 // esp8266 gpio
......
...@@ -16,6 +16,7 @@ public: ...@@ -16,6 +16,7 @@ public:
float acceleration () { return 5; } float acceleration () { return 5; }
long distanceToGo () { return 0; } long distanceToGo () { return 0; }
float speed() {return 0;} float speed() {return 0;}
}; };
#else #else
#include <AccelStepper.h> #include <AccelStepper.h>
...@@ -29,6 +30,7 @@ public: ...@@ -29,6 +30,7 @@ public:
AccelStepper(interface, pin1, pin2, pin3, pin4, enable) { } AccelStepper(interface, pin1, pin2, pin3, pin4, enable) { }
// make it public // make it public
inline unsigned long computeNewSpeed () { return AccelStepper::computeNewSpeed(); } inline unsigned long computeNewSpeed () { return AccelStepper::computeNewSpeed(); }
}; };
......
...@@ -54,6 +54,7 @@ SSD1306AsciiWire oled; ...@@ -54,6 +54,7 @@ SSD1306AsciiWire oled;
#include "Debouncer.h" // local, debouncer, short counter, long detector #include "Debouncer.h" // local, debouncer, short counter, long detector
#include "syringe.h" #include "syringe.h"
#include "syringefilled.h" #include "syringefilled.h"
#include "web.h"
#include "cli.h" #include "cli.h"
#include "common.h" #include "common.h"
#include "fs.h" #include "fs.h"
......
...@@ -10,7 +10,7 @@ Syringe syringe; ...@@ -10,7 +10,7 @@ Syringe syringe;
//CONSTRUCTOR //CONSTRUCTOR
Syringe :: Syringe() Syringe :: Syringe()
{ {
set_syringe("BD_10mL", 10, 14.5); //set_syringe("BD_5mL", 10, 14.5);
//set_syringe("Terumo_5mL", 5, 10); //set_syringe("Terumo_5mL", 5, 10);
//set_syringe("Terumo_2mL", 2, 3); //set_syringe("Terumo_2mL", 2, 3);
//set_syringe("FisherBrand_1mL", 1, 0.5); //set_syringe("FisherBrand_1mL", 1, 0.5);
...@@ -90,7 +90,7 @@ void Syringe :: write_Json () ...@@ -90,7 +90,7 @@ void Syringe :: write_Json ()
{ {
InterruptLock lock; //useful thanks to its constructor (so a is not visible in the code) InterruptLock lock; //useful thanks to its constructor (so a is not visible in the code)
File f = filesystem->open("syringe_json", "w"); //Creation du fichier File f = filesystem->open("syringe_json", "w"); //Creation du fichier
size_t a = serializeJson(syringe_json, f); //remettre f a la plce de json size_t a = serializeJsonPretty(syringe_json, f); //remettre f a la plce de json
Serial.println("Taille de syringe_json"); Serial.println("Taille de syringe_json");
Serial.println(a); Serial.println(a);
f.close(); f.close();
......
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