-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSource_NotDef.ino
More file actions
31 lines (29 loc) · 851 Bytes
/
Source_NotDef.ino
File metadata and controls
31 lines (29 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//****************************************
// Source de puissance non définie *
// Simulation de données *
// ***************************************
void LectureNotDef() {
float Pw = float(int(millis() / 30) % 2000 - 500); //Simulation
if (Pw >= 0) {
PuissanceS_M_inst = Pw;
PuissanceI_M_inst = 0;
PVAS_M_inst = Pw + 250;
PVAI_M_inst = 0;
EASfloat += Pw / 6000.0; // Watt Hour,Every 600ms. Soutirée
Energie_M_Soutiree = int(EASfloat); //
} else {
PuissanceS_M_inst = 0;
PuissanceI_M_inst = -Pw;
PVAI_M_inst = -Pw + 250;
PVAS_M_inst = 0;
EAIfloat += -Pw / 6000.0;
Energie_M_Injectee = int(EAIfloat);
}
Pva_valide = true;
filtre_puissance();
EnergieActiveValide = true;
PuissanceRecue = true;
if (cptLEDyellow > 30) {
cptLEDyellow = 4;
}
}