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
MockSensorController.h
00001 #ifndef __MOCKSENSORCONTROLLER_H__ 00002 #define __MOCKSENSORCONTROLLER_H__ 00003 00004 #include "mbed.h" 00005 00006 #include "SensorController.h" 00007 00008 class MockSensorController : public SensorController { 00009 public: 00010 MockSensorController(bool threaded, int interval_ms, float (*func)(int, int)) : SensorController(threaded, interval_ms) { 00011 this->func = func; 00012 t.start(); 00013 } 00014 00015 virtual void update(); 00016 00017 virtual float getValue(); 00018 00019 virtual std::string getName(); 00020 00021 virtual void setLed(bool); 00022 00023 private: 00024 int i; 00025 Timer t; 00026 long int sum_t; 00027 float (*func)(int, int); 00028 }; 00029 00030 #endif
Generated on Tue Jul 12 2022 18:59:29 by
1.7.2