18 const auto value =
get();
19 efiPrintf(
"StoredValue Sensor \"%s\": valid: %s, value: %.2f", sensorName,
boolToString(value.Valid), value.Value);
27 const auto value =
get();
28 efiPrintf(
"Sensor \"%s\": Raw value: %.2f Valid: %s Converted value %.2f", sensorName,
getRaw(),
boolToString(value.Valid), value.Value);
37 const auto value =
get();
38 efiPrintf(
"Sensor \"%s\": Raw value: %.2f Valid: %s Converted value %.2f", sensorName,
getRaw(),
boolToString(value.Valid), value.Value);
41#if EFI_CAN_SUPPORT || EFI_UNIT_TEST
45 const auto value =
get();
46 efiPrintf(
"CAN Sensor \"%s\": valid: %s value: %.2f", sensorName,
boolToString(value.Valid), value.Value);
55 efiPrintf(
"FrequencySensor \"%s\" counter %d", sensorName,
eventCounter);
67#if EFI_SHAFT_POSITION_INPUT
68 efiPrintf(
"RPM sensor: stopped: %d spinning up: %d cranking: %d running: %d rpm: %f",
79 efiPrintf(
"%s: LPS25 baro %.2f kPa", sensorName,
get().Value);
83 const auto value =
get();
84 efiPrintf(
"Sensor \"%s\" is MAP averager: valid: %s value: %.2f averaged sample count: %d", sensorName,
boolToString(value.Valid), value.Value,
m_lastCounter);
89 const auto value =
convert(testRawValue);
90 efiPrintf(
" raw value %.2f converts to %.2f valid: %s", testRawValue, value.Value,
boolToString(value.Valid));
94 const auto result =
convert(testInputValue);
99 const auto value =
convert(testInputValue);
100 efiPrintf(
" %.1f ohms -> valid: %s. %.1f deg C", testInputValue,
boolToString(value.Valid), value.Value);
104 efiPrintf(
" Identity function passes along value.");
void showInfo(const char *sensorName) const override
void showInfo(const char *sensorName) const override
const SensorType m_primary
const SensorType m_fallback
void showInfo(const char *sensorName) const override
void showInfo(const char *sensorName) const override
void showInfo(const char *sensorName) const override
SensorConverter * getFunction() const
float getRaw() const override final
SensorResult convert(float inputValue) const override
void showInfo(float testRawValue) const override
void showInfo(const char *sensorName) const override
void showInfo(const char *sensorName) const override
void showInfo(const char *sensorName) const override
SensorType m_proxiedSensor
const SensorType m_second
void showInfo(const char *sensorName) const override
const SensorType m_second
void showInfo(const char *sensorName) const override
SensorResult convert(float inputValue) const override
void showInfo(float testInputValue) const override
bool isSpinningUp() const
bool isStopped() const override
void showInfo(const char *sensorName) const override
bool isCranking() const override
const char * getSensorName() const
void showInfo(const char *sensorName) const override
SensorResult get() const final override
void showInfo(float testRawValue) const override
SensorResult convert(float ohms) const override
const char * boolToString(bool value)
A sensor to duplicate a sensor to an additional SensorType.
Base class for a sensor that has its value asynchronously set, then later retrieved by a consumer.
void showInfo(float testRawValue) const