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
Diff: PIDController.cpp
- Revision:
- 40:1668630544c7
- Parent:
- 38:930469a33001
- Child:
- 44:7c932cc5991b
--- a/PIDController.cpp Tue Jun 14 19:11:19 2016 +0000 +++ b/PIDController.cpp Wed Jun 15 07:25:53 2016 +0000 @@ -69,7 +69,7 @@ } void PIDController::pump_water(DRV8825 *mtr, int ml) { - + this->pumping = true; int j = 5010 * (ml - 1); for (int i = 500; i < MAX_SPEED; i += 5) { @@ -99,6 +99,7 @@ } wait(3); + this->pumping = false; } @@ -122,6 +123,10 @@ return this->heating; } +bool PIDController::is_pumping() { + return this->pumping; +} + void PIDController::set_heating(bool enabled) { if(enabled == this->heating) return;