![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
carte esclave pompe 2020 V1
Dependencies: mbed ident_crac
class_ventouse.h@24:3fb41d2b91af, 2020-07-17 (annotated)
- Committer:
- maximilienlv
- Date:
- Fri Jul 17 14:34:32 2020 +0000
- Revision:
- 24:3fb41d2b91af
- Parent:
- 23:7f62f27c028f
version fonctionnel strat
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
marwanesaich | 0:84a8c24e29ae | 1 | #ifndef CLASS_VENTOUSE_H |
marwanesaich | 0:84a8c24e29ae | 2 | #define CLASS_VENTOUSE_H |
kyxstark | 12:2491a5b0f90b | 3 | #include "extern.h" |
kyxstark | 8:a25a9c22ba91 | 4 | |
maximilienlv | 21:42d6cead9cc2 | 5 | #define NB_VENTOUSES 6 |
kyxstark | 8:a25a9c22ba91 | 6 | |
marwanesaich | 2:4cc8fa2f64be | 7 | typedef enum {Attente, Attraper, Attraper_ok, Relacher, Relacher_ok} type_etat ; |
marwanesaich | 0:84a8c24e29ae | 8 | |
maximilienlv | 23:7f62f27c028f | 9 | class Ventouse{ |
marwanesaich | 0:84a8c24e29ae | 10 | public: |
marwanesaich | 2:4cc8fa2f64be | 11 | Ventouse(PinName pinPompe, PinName pinElectrovanne, PinName pinCapteurPression, char index); |
marwanesaich | 0:84a8c24e29ae | 12 | |
marwanesaich | 2:4cc8fa2f64be | 13 | void automate(); |
marwanesaich | 2:4cc8fa2f64be | 14 | void action(bool action); |
marwanesaich | 0:84a8c24e29ae | 15 | void attraper(); |
marwanesaich | 0:84a8c24e29ae | 16 | void relacher(); |
marwanesaich | 0:84a8c24e29ae | 17 | |
marwanesaich | 2:4cc8fa2f64be | 18 | bool getPression(); |
marwanesaich | 2:4cc8fa2f64be | 19 | bool getPompe(); |
marwanesaich | 0:84a8c24e29ae | 20 | |
marwanesaich | 0:84a8c24e29ae | 21 | void setPompe(float val); |
kyxstark | 8:a25a9c22ba91 | 22 | void setElectrovanne(int val); |
marwanesaich | 0:84a8c24e29ae | 23 | |
marwanesaich | 0:84a8c24e29ae | 24 | |
marwanesaich | 0:84a8c24e29ae | 25 | private: |
marwanesaich | 0:84a8c24e29ae | 26 | PwmOut* m_pompe; |
maximilienlv | 19:952208276c63 | 27 | PwmOut* m_electrovanne; |
marwanesaich | 0:84a8c24e29ae | 28 | AnalogIn* m_pression; |
marwanesaich | 0:84a8c24e29ae | 29 | |
marwanesaich | 5:176e7353ba1c | 30 | bool flag_electrovanne; |
marwanesaich | 2:4cc8fa2f64be | 31 | bool flag_attraper; |
marwanesaich | 2:4cc8fa2f64be | 32 | bool flag_relacher; |
marwanesaich | 2:4cc8fa2f64be | 33 | type_etat etat; |
marwanesaich | 2:4cc8fa2f64be | 34 | char m_index; |
marwanesaich | 2:4cc8fa2f64be | 35 | char m_ack; |
marwanesaich | 5:176e7353ba1c | 36 | |
marwanesaich | 0:84a8c24e29ae | 37 | PinName m_pinPompe, m_pinElectrovanne, m_pinCapteurPression; |
marwanesaich | 0:84a8c24e29ae | 38 | }; |
maximilienlv | 21:42d6cead9cc2 | 39 | #endif //CLASS_VENTOUSE_H |