| 1234567891011121314151617181920212223242526272829303132333435 |
- /*
- * Tab.c
- *
- * Created on: 15 janv. 2019
- * Author: e_rcluze
- */
- #include "Tab.h"
- extern Sortie tabSortie[NBLIGNEACTIVE];
- extern uint8_t gl_Stop;
- extern uint8_t gl_Essai;
- void initTab(Sortie *S) {
- S[0].OUT = 0b0000000000000100;
- S[1].OUT = 0b0000000000001000;
- S[2].OUT = 0b0000000000000011;
- S[3].OUT = 0b0000000000010000;
- //S[1].OUT = 0b0000000000000010;
- //S[2].OUT = 0b0000000000000100;
- //S[3].OUT = 0b0000000000001000;
- }
- uint8_t newStatus(Sortie *s, uint16_t heure) {
- if (heure >= s->Demmarage & heure < s->Extinxtion) {
- if (heure < s->Demmarage + s->Pente)
- return ENALLUME;
- else if(heure > s->Extinxtion - s->Pente)
- return ENETEIN;
- else
- return ALLUME;
- } else
- return ETEIN;
- }
|