Reorganisation classes 4.1 + TODO
This commit is contained in:
parent
b25052ecaf
commit
a070cc44eb
2 changed files with 17 additions and 17 deletions
|
@ -6,7 +6,7 @@ int main(){
|
||||||
// creation d'une board
|
// creation d'une board
|
||||||
Board esp8266;
|
Board esp8266;
|
||||||
// achat des senseurs et actionneurs
|
// achat des senseurs et actionneurs
|
||||||
AnalogSensorTemperature temperature(DELAY,TEMP);
|
AnalogSensorTemperature temperature(TEMP,DELAY);
|
||||||
//DigitalActuatorLED led1(DELAY);
|
//DigitalActuatorLED led1(DELAY);
|
||||||
IntelligentDigitalActuatorLED led1(DELAY);
|
IntelligentDigitalActuatorLED led1(DELAY);
|
||||||
I2CActuatorScreen screen;
|
I2CActuatorScreen screen;
|
||||||
|
|
|
@ -61,22 +61,22 @@ IntelligentDigitalActuatorLED::IntelligentDigitalActuatorLED(int t):DigitalDevic
|
||||||
void IntelligentDigitalActuatorLED::run(){
|
void IntelligentDigitalActuatorLED::run(){
|
||||||
int previousState = LOW; //initialisee a eteint
|
int previousState = LOW; //initialisee a eteint
|
||||||
while(1){
|
while(1){
|
||||||
if(ptrmem!=NULL)
|
if(ptrmem!=NULL) {
|
||||||
state=*ptrmem;
|
state = *ptrmem;
|
||||||
if (state==LOW ){
|
if (state == LOW) {
|
||||||
cout << "((((eteint))))\n";
|
cout << "((((eteint))))\n";
|
||||||
if(state != previousState){
|
if (state != previousState) {
|
||||||
luminosite_environnement-= 50;
|
luminosite_environnement -= 50;
|
||||||
}
|
}
|
||||||
previousState = state;
|
previousState = state;
|
||||||
}
|
} else { //state == HIGH
|
||||||
else{ //state == HIGH
|
cout << "((((allume))))\n";
|
||||||
cout << "((((allume))))\n";
|
if (state != previousState) {
|
||||||
if(state != previousState){
|
luminosite_environnement += 50;
|
||||||
luminosite_environnement+= 50;
|
}
|
||||||
}
|
previousState = state;
|
||||||
previousState = state;
|
}
|
||||||
}
|
}
|
||||||
sleep(temps);
|
sleep(temps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue