carte esclave pompe 2020 V1
Dependencies: mbed ident_crac
Diff: class_ventouse.h
- Revision:
- 8:a25a9c22ba91
- Parent:
- 5:176e7353ba1c
- Child:
- 12:2491a5b0f90b
diff -r 43d9c70b6689 -r a25a9c22ba91 class_ventouse.h --- a/class_ventouse.h Tue May 21 14:17:12 2019 +0000 +++ b/class_ventouse.h Wed May 22 09:52:47 2019 +0000 @@ -2,6 +2,16 @@ #define CLASS_VENTOUSE_H #include "mbed.h" +#include "ident_crac.h" + + +#ifdef ROBOT_SMALL + #define NB_VENTOUSES 8 +#endif + +#ifdef ROBOT_BIG + #define NB_VENTOUSES 3 +#endif typedef enum {Attente, Attraper, Attraper_ok, Relacher, Relacher_ok} type_etat ; @@ -21,14 +31,15 @@ void setPompe(float val); - void setElectrovanne(float val); + void setElectrovanne(int val); private: PwmOut* m_pompe; - PwmOut* m_electrovanne; + //PwmOut* m_electrovanne; + DigitalOut* m_electrovanne; AnalogIn* m_pression; bool flag_electrovanne;