From 2933bf6852cbfa1c7ff784d7a3e57a41c6fb8562 Mon Sep 17 00:00:00 2001 From: bray Date: Mon, 18 May 2020 14:04:45 +0200 Subject: [PATCH] modif radiator --- .../DigitalActuatorRadiator.cpp | 20 +++++++++++++------ .../DigitalActuatorRadiator.h | 16 ++++++++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/OtherDevices/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.cpp b/OtherDevices/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.cpp index d8d0309..cdbc2af 100644 --- a/OtherDevices/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.cpp +++ b/OtherDevices/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.cpp @@ -4,8 +4,8 @@ #include "../../../include/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.h" -DigitalActuatorRadiator::DigitalActuatorRadiator(int temps, float threshold) : DigitalActuator(temps), -threshold(threshold) {} +DigitalActuatorRadiator::DigitalActuatorRadiator(int temps, float thresholdHigh, float thresholdLow) : DigitalActuator(temps), +thresholdHigh(thresholdHigh), thresholdLow(thresholdLow) {} void DigitalActuatorRadiator::activate() { DigitalDevice::state = HIGH; @@ -23,10 +23,18 @@ void DigitalActuatorRadiator::Run() { } } -float DigitalActuatorRadiator::getThreshold() const { - return threshold; +float DigitalActuatorRadiator::getThresholdLow() const { + return thresholdLow; } -void DigitalActuatorRadiator::setThreshold(float threshold) { - DigitalActuatorRadiator::threshold = threshold; +void DigitalActuatorRadiator::setThresholdLow(float thresholdLow) { + DigitalActuatorRadiator::thresholdLow = thresholdLow; +} + +float DigitalActuatorRadiator::getThresholdHigh() const { + return thresholdHigh; +} + +void DigitalActuatorRadiator::setThresholdHigh(float threshold) { + DigitalActuatorRadiator::thresholdHigh = threshold; } diff --git a/include/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.h b/include/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.h index 7440564..8aa0004 100644 --- a/include/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.h +++ b/include/DigitalDevices/DigitalActuators/DigitalActuatorRadiator.h @@ -11,12 +11,18 @@ class DigitalActuatorRadiator : public DigitalActuator { private: - float threshold; -public: - DigitalActuatorRadiator(int temps, float threshold); + float thresholdHigh, thresholdLow; + +public: + DigitalActuatorRadiator(int temps, float threshold, float thresholdLow); + + float getThresholdHigh() const; + void setThresholdHigh(float threshold); + + float getThresholdLow() const; + + void setThresholdLow(float thresholdLow); - float getThreshold() const; - void setThreshold(float threshold); void activate(); void Run(); };