diff --git a/common.h b/common.h index ddb99ec5c939c7df72b4d0a9608e589aac1e8785..3a8006a29f55a3f30a919852489ed3af1c76f8fe 100644 --- a/common.h +++ b/common.h @@ -14,8 +14,6 @@ extern const char* msgHeader; -void web_setup (); -void web_loop (); // A4988 PINOUT #define DIR 15 // esp8266 gpio diff --git a/motor.h b/motor.h index 01a3f8520b609f75904209bed4d7616bf2a4fa6c..710caf9f27e1800bf973b56013c147456285789f 100644 --- a/motor.h +++ b/motor.h @@ -16,6 +16,7 @@ public: float acceleration () { return 5; } long distanceToGo () { return 0; } float speed() {return 0;} + }; #else #include <AccelStepper.h> @@ -29,6 +30,7 @@ public: AccelStepper(interface, pin1, pin2, pin3, pin4, enable) { } // make it public inline unsigned long computeNewSpeed () { return AccelStepper::computeNewSpeed(); } + }; diff --git a/pousseseringue-arduino.cpp b/pousseseringue-arduino.cpp index 3703f127294752f973d77875550d156498a61b21..a049e15296bf724cddc6beaccf0ddad13d04d8f8 100644 --- a/pousseseringue-arduino.cpp +++ b/pousseseringue-arduino.cpp @@ -54,6 +54,7 @@ SSD1306AsciiWire oled; #include "Debouncer.h" // local, debouncer, short counter, long detector #include "syringe.h" #include "syringefilled.h" +#include "web.h" #include "cli.h" #include "common.h" #include "fs.h" diff --git a/syringe.cpp b/syringe.cpp index aad4cef4fbf3f4773c49af69ca363b889fe37a84..0ee087c3851e402b88adc16846c95e46fa5b7fe8 100644 --- a/syringe.cpp +++ b/syringe.cpp @@ -10,7 +10,7 @@ Syringe syringe; //CONSTRUCTOR 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_2mL", 2, 3); //set_syringe("FisherBrand_1mL", 1, 0.5); @@ -90,7 +90,7 @@ void Syringe :: write_Json () { 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 -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(a); f.close();