Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed ident_crac
Diff: class_ventouse.h
- Revision:
- 3:cf33f9d4d6ff
- Parent:
- 2:4cc8fa2f64be
--- a/class_ventouse.h Tue May 07 13:14:29 2019 +0000
+++ b/class_ventouse.h Tue May 07 18:53:22 2019 +0000
@@ -3,12 +3,12 @@
#include "mbed.h"
-typedef enum {Attente, Attraper, Attraper_ok, Relacher, Relacher_ok} type_etat ;
class Ventouse
{
public:
Ventouse(PinName pinPompe, PinName pinElectrovanne, PinName pinCapteurPression, char index);
+ Ventouse(PinName pinPompe, PinName pinCapteurPression, char index);
void automate();
void action(bool action);
@@ -26,6 +26,10 @@
private:
+
+
+ typedef enum {Attente, Attraper, Attraper_ok, Relacher} type_etat ;
+
PwmOut* m_pompe;
PwmOut* m_electrovanne;
AnalogIn* m_pression;
@@ -33,9 +37,11 @@
bool flag_attraper;
bool flag_relacher;
type_etat etat;
- char m_index;
char m_ack;
PinName m_pinPompe, m_pinElectrovanne, m_pinCapteurPression;
+ char m_index;
+
+ bool flag_electrovanne; // 1->presence EV, 0->absence EV
};