Tab.h 1006 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Tab.h
  3. *
  4. * Created on: 14 janv. 2019
  5. * Author: e_rcluze
  6. */
  7. #ifndef TAB_H_
  8. #define TAB_H_
  9. #define NBLIGNEACTIVE 4
  10. #define ALLUME 0
  11. #define ETEIN 1
  12. #define ENALLUME 2
  13. #define ENETEIN 3
  14. #include <stdint.h>
  15. typedef struct {
  16. /*
  17. * Sortie OUT en binnaire
  18. * 0b 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  19. * X X X X X X S10 S9 S8 S7 S6 S5 S4 S3 S2 S1
  20. */
  21. uint16_t OUT;
  22. uint16_t Demmarage; //Heure de D�marage (en Minute)
  23. uint16_t Extinxtion; //Heure de D�xtintion (en Minute)
  24. uint8_t PuissanceMax; //Puissance Maximum (En pourcentage)
  25. uint8_t Pente; //Pente (en Minute)
  26. uint8_t PuissanceEssai; // puissance d'essai
  27. uint8_t Status;
  28. }Sortie;
  29. Sortie tabSortie[NBLIGNEACTIVE];
  30. uint8_t gl_Stop;
  31. uint8_t gl_Essai;
  32. /**
  33. * initialise les tableaus des sortie
  34. * utile pour les OUT
  35. */
  36. void initTab(Sortie *S);
  37. /*
  38. * renvoie le status dans laquelle la sortie devrai etre (mise a jour du status)
  39. */
  40. uint8_t newStatus(Sortie *S, uint16_t heure);
  41. #endif /* TAB_H_ */