sensors: StoredValueSensor: showInfo()
This commit is contained in:
parent
180d91b0ed
commit
f685025d2c
|
@ -75,7 +75,7 @@ public:
|
|||
m_lastUpdate = timestamp;
|
||||
}
|
||||
|
||||
void showInfo(const char*) const override { }
|
||||
void showInfo(const char* sensorName) const override;
|
||||
|
||||
virtual void setTimeout(int timeoutMs) {
|
||||
m_timeoutPeriod = MS2NT(timeoutMs);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "pch.h"
|
||||
#include "stored_value_sensor.h"
|
||||
#include "proxy_sensor.h"
|
||||
#include "functional_sensor.h"
|
||||
#include "redundant_sensor.h"
|
||||
|
@ -12,6 +13,11 @@
|
|||
#include "identity_func.h"
|
||||
#include "map_averaging.h"
|
||||
|
||||
void StoredValueSensor::showInfo(const char* sensorName) const {
|
||||
const auto value = get();
|
||||
efiPrintf("StoredValue Sensor \"%s\": valid: %s, value: %.2f", sensorName, boolToString(value.Valid), value.Value);
|
||||
}
|
||||
|
||||
void ProxySensor::showInfo(const char* sensorName) const {
|
||||
efiPrintf("Sensor \"%s\" proxied from sensor \"%s\"", sensorName, getSensorName(m_proxiedSensor));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue