| 12345678910111213141516171819202122232425262728293031 |
- /*
- * Tab.c
- *
- * Created on: 15 janv. 2019
- * Author: e_rcluze
- */
- #include "Tab.h"
- 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;
- }
|