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
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void set(float value)
|
|
|
|
{
|
2020-01-12 00:25:23 -08:00
|
|
|
setValidValue(value, 0);
|
2019-09-21 11:33:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void invalidate()
|
|
|
|
{
|
|
|
|
StoredValueSensor::invalidate();
|
|
|
|
}
|
|
|
|
};
|