20 lines
625 B
C++
20 lines
625 B
C++
//
|
|
// Created by camer on 16/05/2020.
|
|
//
|
|
|
|
#include "../../../include/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.h"
|
|
|
|
DigitalActuatorRadiator::DigitalActuatorRadiator(int temps) : DigitalActuator(temps){}
|
|
void DigitalActuatorRadiator::run() {
|
|
int previousState = LOW;
|
|
while (1){
|
|
state = *ptrmem;
|
|
if ((state != previousState)&&(state == HIGH)){
|
|
AnalogSensorTemperature::setAlea(1);
|
|
previousState = HIGH;
|
|
} else if((state != previousState)&&(state == LOW)) {
|
|
AnalogSensorTemperature::setAlea(-1);
|
|
previousState = LOW;
|
|
}
|
|
}
|
|
}
|