Program for the water play project for the course Software Testing Practical 2016 given at the VU University

Dependencies:   mbed DRV88255 TextLCD Ping mbed-rtos

Revision:
49:ca6fb19fc280
Parent:
47:a73b8640fb60
Child:
57:8dc3192ff150
--- a/PIDController.cpp	Wed Jun 15 11:37:44 2016 +0000
+++ b/PIDController.cpp	Fri Jun 17 08:23:04 2016 +0000
@@ -22,7 +22,14 @@
     
     // Control the heater
     // This could be done in the pumping function as well, if needed
-    this->set_heating(this->temp->getValue() < 32.0f);
+    if (this->is_heating() && this->temp->getValue() >= 33.0f)
+    {
+        this->set_heating(false);
+    } else if (!this->is_heating() && this->temp->getValue() < 32.0f)
+    {
+        this->set_heating(true);
+    }
+    //this->set_heating(this->temp->getValue() < 32.0f);
 
     float s = this->salt->getValue();
     float sInGrams = this->getSaltInGrams();