a
centrale.cpp@0:cf0b786cba59, 2020-12-16 (annotated)
- Committer:
- schnf30
- Date:
- Wed Dec 16 09:11:06 2020 +0000
- Revision:
- 0:cf0b786cba59
Sauve
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
schnf30 | 0:cf0b786cba59 | 1 | // librairie pour la centrale dalarme |
schnf30 | 0:cf0b786cba59 | 2 | // version 1.0 |
schnf30 | 0:cf0b786cba59 | 3 | // 07/12/2020 |
schnf30 | 0:cf0b786cba59 | 4 | // fait par Ralph ...... |
schnf30 | 0:cf0b786cba59 | 5 | |
schnf30 | 0:cf0b786cba59 | 6 | #include "centrale.h" |
schnf30 | 0:cf0b786cba59 | 7 | #include "etat.h" |
schnf30 | 0:cf0b786cba59 | 8 | /* |
schnf30 | 0:cf0b786cba59 | 9 | reçoit la valeur de l'entree |
schnf30 | 0:cf0b786cba59 | 10 | */ |
schnf30 | 0:cf0b786cba59 | 11 | int TraitEntree(float entree) |
schnf30 | 0:cf0b786cba59 | 12 | { |
schnf30 | 0:cf0b786cba59 | 13 | int result; |
schnf30 | 0:cf0b786cba59 | 14 | if (entree<VCc) result = Cc; //Courtcircuit |
schnf30 | 0:cf0b786cba59 | 15 | else if (entree<VAn) result = An; //anomalie |
schnf30 | 0:cf0b786cba59 | 16 | else if (entree<VNl) result = Nl; //normal |
schnf30 | 0:cf0b786cba59 | 17 | else result = Cp; |
schnf30 | 0:cf0b786cba59 | 18 | return result; |
schnf30 | 0:cf0b786cba59 | 19 | } |