2019-09-21 11:33:38 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "stored_value_sensor.h"
|
2020-01-12 00:25:23 -08:00
|
|
|
#include "global.h"
|
2019-09-21 11:33:38 -07:00
|
|
|
|
|
|
|
struct MockSensor final : public StoredValueSensor
|
|
|
|
{
|
2020-01-12 00:25:23 -08:00
|
|
|
MockSensor(SensorType type) : StoredValueSensor(type, MS2NT(50))
|
2019-09-21 11:33:38 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-07-19 15:05:31 -07:00
|
|
|
void set(float value) {
|
|
|
|
setValidValue(value, getTimeNowNt());
|
2019-09-21 11:33:38 -07:00
|
|
|
}
|
|
|
|
|
2020-07-19 15:05:31 -07:00
|
|
|
void invalidate() {
|
2019-09-21 11:33:38 -07:00
|
|
|
StoredValueSensor::invalidate();
|
|
|
|
}
|
2020-03-30 15:29:42 -07:00
|
|
|
|
|
|
|
void showInfo(Logging* logger, const char* name) const override {}
|
2019-09-21 11:33:38 -07:00
|
|
|
};
|