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: MockSensorController.h
- Revision:
- 13:1323e2c0b697
- Parent:
- 12:c51f3aba84fe
- Child:
- 57:8dc3192ff150
--- a/MockSensorController.h Sat Jun 11 10:14:40 2016 +0000
+++ b/MockSensorController.h Sat Jun 11 13:19:20 2016 +0000
@@ -7,8 +7,9 @@
class MockSensorController : public SensorController {
public:
- MockSensorController(bool threaded, int interval_ms, float (*func)(int)) : SensorController(threaded, interval_ms) {
- this->func = func;
+ MockSensorController(bool threaded, int interval_ms, float (*func)(int, int)) : SensorController(threaded, interval_ms) {
+ this->func = func;
+ t.start();
}
virtual void update();
@@ -19,7 +20,9 @@
private:
int i;
- float (*func)(int);
+ Timer t;
+ long int sum_t;
+ float (*func)(int, int);
};
#endif
\ No newline at end of file