Saltware / Mbed 2 deprecated Water Play

Dependencies:   mbed DRV88255 TextLCD Ping mbed-rtos

MockSensorController.h

Committer:
sbouber1
Date:
2016-06-19
Revision:
57:8dc3192ff150
Parent:
13:1323e2c0b697
Child:
66:133398875949

File content as of revision 57:8dc3192ff150:

#ifndef __MOCKSENSORCONTROLLER_H__
#define __MOCKSENSORCONTROLLER_H__

#include "mbed.h"

#include "SensorController.h"

class MockSensorController : public SensorController {
    public:
        MockSensorController(bool threaded, int interval_ms, float (*func)(int, int)) : SensorController(threaded, interval_ms) {
            this->func = func;  
            t.start();  
        }  
        
        virtual void update();
        
        virtual float getValue();
        
        virtual std::string getName();
    
    private:
        int i;
        Timer t;
        long int sum_t;
        float (*func)(int, int);
};

#endif