![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
carte esclave pompe 2020 V1
Dependencies: mbed ident_crac
class_ventouse.h@12:2491a5b0f90b, 2019-05-23 (annotated)
- Committer:
- kyxstark
- Date:
- Thu May 23 08:41:01 2019 +0000
- Revision:
- 12:2491a5b0f90b
- Parent:
- 8:a25a9c22ba91
- Child:
- 19:952208276c63
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 | |
kyxstark | 8:a25a9c22ba91 | 5 | |
kyxstark | 8:a25a9c22ba91 | 6 | #ifdef ROBOT_SMALL |
kyxstark | 8:a25a9c22ba91 | 7 | #define NB_VENTOUSES 8 |
kyxstark | 8:a25a9c22ba91 | 8 | #endif |
kyxstark | 8:a25a9c22ba91 | 9 | |
kyxstark | 8:a25a9c22ba91 | 10 | #ifdef ROBOT_BIG |
kyxstark | 8:a25a9c22ba91 | 11 | #define NB_VENTOUSES 3 |
kyxstark | 8:a25a9c22ba91 | 12 | #endif |
marwanesaich | 0:84a8c24e29ae | 13 | |
marwanesaich | 2:4cc8fa2f64be | 14 | typedef enum {Attente, Attraper, Attraper_ok, Relacher, Relacher_ok} type_etat ; |
marwanesaich | 0:84a8c24e29ae | 15 | |
marwanesaich | 0:84a8c24e29ae | 16 | class Ventouse |
marwanesaich | 0:84a8c24e29ae | 17 | { |
marwanesaich | 0:84a8c24e29ae | 18 | public: |
marwanesaich | 5:176e7353ba1c | 19 | Ventouse(PinName pinPompe, PinName pinCapteurPression, char index); |
marwanesaich | 2:4cc8fa2f64be | 20 | Ventouse(PinName pinPompe, PinName pinElectrovanne, PinName pinCapteurPression, char index); |
marwanesaich | 0:84a8c24e29ae | 21 | |
marwanesaich | 2:4cc8fa2f64be | 22 | void automate(); |
marwanesaich | 2:4cc8fa2f64be | 23 | void action(bool action); |
marwanesaich | 0:84a8c24e29ae | 24 | void attraper(); |
marwanesaich | 0:84a8c24e29ae | 25 | void relacher(); |
marwanesaich | 0:84a8c24e29ae | 26 | |
marwanesaich | 2:4cc8fa2f64be | 27 | bool getPression(); |
marwanesaich | 2:4cc8fa2f64be | 28 | bool getPompe(); |
marwanesaich | 0:84a8c24e29ae | 29 | |
marwanesaich | 0:84a8c24e29ae | 30 | |
marwanesaich | 0:84a8c24e29ae | 31 | void setPompe(float val); |
kyxstark | 8:a25a9c22ba91 | 32 | void setElectrovanne(int val); |
marwanesaich | 0:84a8c24e29ae | 33 | |
marwanesaich | 0:84a8c24e29ae | 34 | |
marwanesaich | 0:84a8c24e29ae | 35 | |
marwanesaich | 0:84a8c24e29ae | 36 | |
marwanesaich | 0:84a8c24e29ae | 37 | private: |
marwanesaich | 0:84a8c24e29ae | 38 | PwmOut* m_pompe; |
kyxstark | 8:a25a9c22ba91 | 39 | //PwmOut* m_electrovanne; |
kyxstark | 8:a25a9c22ba91 | 40 | DigitalOut* m_electrovanne; |
marwanesaich | 0:84a8c24e29ae | 41 | AnalogIn* m_pression; |
marwanesaich | 0:84a8c24e29ae | 42 | |
marwanesaich | 5:176e7353ba1c | 43 | bool flag_electrovanne; |
marwanesaich | 2:4cc8fa2f64be | 44 | bool flag_attraper; |
marwanesaich | 2:4cc8fa2f64be | 45 | bool flag_relacher; |
marwanesaich | 2:4cc8fa2f64be | 46 | type_etat etat; |
marwanesaich | 2:4cc8fa2f64be | 47 | char m_index; |
marwanesaich | 2:4cc8fa2f64be | 48 | char m_ack; |
marwanesaich | 5:176e7353ba1c | 49 | |
marwanesaich | 0:84a8c24e29ae | 50 | PinName m_pinPompe, m_pinElectrovanne, m_pinCapteurPression; |
marwanesaich | 0:84a8c24e29ae | 51 | |
marwanesaich | 0:84a8c24e29ae | 52 | |
marwanesaich | 0:84a8c24e29ae | 53 | }; |
marwanesaich | 0:84a8c24e29ae | 54 | |
marwanesaich | 0:84a8c24e29ae | 55 | #endif //CLASS_VENTOUSE_H |
marwanesaich | 0:84a8c24e29ae | 56 |