Saltware / Mbed 2 deprecated Water Play

Dependencies:   mbed DRV88255 TextLCD Ping mbed-rtos

Revision:
21:17dd0d778bda
Parent:
19:ee89eabe1fa2
Child:
22:4b5bf1c2e1ff
Child:
24:eeef4009640d
--- a/testing.cpp	Mon Jun 13 12:51:19 2016 +0000
+++ b/testing.cpp	Mon Jun 13 12:57:14 2016 +0000
@@ -1,8 +1,10 @@
+#include "mbed.h"
+
 #include "MockSensorController.h"
 #include "AlarmController.h"
 #include "testing.h"
 
-
+#define NUMBER_OF_SEC_BEFORE_CRITICAL_ALARM 30
 
 void TestCase::assertTrue(bool b, const char *error) {
     if(!b) {
@@ -20,7 +22,11 @@
     DEF_MOCKS(temp_mock1, salt_mock1, prox_mock1);
     
     AlarmController alarm(false,0,&temp,&salt,&prox);
-    alarm.run();
+    for(int i = 0; i < NUMBER_OF_SEC_BEFORE_CRITICAL_ALARM+5; i++) {
+        alarm.run();
+        Thread::wait(1000);
+    }
+    
     return alarm.is_error();    
 }