Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DRV88255 TextLCD Ping mbed-rtos
Revision 74:05f2188cfc0b, committed 2016-06-22
- Comitter:
- sbouber1
- Date:
- Wed Jun 22 11:16:00 2016 +0000
- Parent:
- 73:bafd8d0f3daf
- Child:
- 75:763f3f0a311c
- Commit message:
- update
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Jun 21 13:49:11 2016 +0000
+++ b/main.cpp Wed Jun 22 11:16:00 2016 +0000
@@ -8,7 +8,8 @@
#include "SensorAlarmController.h"
#include "PIDController.h"
#include "settings.h"
-
+#include "testing.h"
+#include "MockSensorController.h"
#include "mbed.h"
extern int testMain();
@@ -19,6 +20,7 @@
return MAIN();
}
+MOCK(salinity_mock, 3.0f);
int realMain() {
@@ -37,7 +39,8 @@
ProximityController proximity(false, 0);
controllers.push_back((void*)&proximity);
- SalinityController salt(false, 0);
+ //SalinityController salt(false, 0);
+ MockSensorController salt(false,0,salinity_mock);
controllers.push_back((void *)&salt);
// Add alarms to monitor sensor values
@@ -116,8 +119,12 @@
#endif
}
- if(!prox_alarm.isActive())
+ if(!prox_alarm.isActive()) {
+ printf("Running pidcontroller!\r\n");
pidc.run();
+ } else {
+ printf("Not running pidcontroller, prox alarm is active!\r\n");
+ }
//Show temperature, salinity and volume of the water tank on the PC if connected through serial