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
Diff: main.cpp
- Revision:
- 13:1323e2c0b697
- Parent:
- 12:c51f3aba84fe
- Child:
- 14:fcb625520e77
--- a/main.cpp Sat Jun 11 10:14:40 2016 +0000 +++ b/main.cpp Sat Jun 11 13:19:20 2016 +0000 @@ -11,17 +11,33 @@ #include "mbed.h" #include "rtos.h" +#include "testing.h" #define MAIN_THREAD_DELAY_MS 1000 -#define MOCK(N, F) static inline float N(int i) {return (F);} +#define MOCK(N, F) static inline float N(int i, int t) {return (F);} + +int main(); +int test_main(); +int real_main(); + + MOCK(temp_mock, 20.0+0.01*i) MOCK(salt_mock, 3.0+0.001*i) MOCK(prox_mock, 10.0f) -int main() + +int main() { + return MAIN(); +} + +int test_main() { + // run tests here +} + +int real_main() { std::vector<void *> controllers;