From eda1ec70daf869d01405ae9223f5414b97edffe3 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 5 Oct 2022 23:37:07 -0400 Subject: [PATCH] FrequencySensor::showInfo --- firmware/controllers/sensors/frequency_sensor.h | 2 ++ firmware/controllers/sensors/sensor_info_printing.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/firmware/controllers/sensors/frequency_sensor.h b/firmware/controllers/sensors/frequency_sensor.h index b4441ddc72..93a2b0a20c 100644 --- a/firmware/controllers/sensors/frequency_sensor.h +++ b/firmware/controllers/sensors/frequency_sensor.h @@ -17,6 +17,8 @@ public: // sad workaround: we are not good at BiQuad configuring bool useBiQuad = true; + void showInfo(const char* sensorName) const override; + void onEdge(efitick_t nowNt); int eventCounter = 0; diff --git a/firmware/controllers/sensors/sensor_info_printing.cpp b/firmware/controllers/sensors/sensor_info_printing.cpp index d6488e8f4b..44b75f9942 100644 --- a/firmware/controllers/sensors/sensor_info_printing.cpp +++ b/firmware/controllers/sensors/sensor_info_printing.cpp @@ -4,6 +4,7 @@ #include "redundant_sensor.h" #include "redundant_ford_tps.h" #include "fallback_sensor.h" +#include "frequency_sensor.h" #include "Lps25Sensor.h" #include "linear_func.h" #include "resistance_func.h" @@ -37,6 +38,10 @@ void RedundantSensor::showInfo(const char* sensorName) const { efiPrintf("Sensor \"%s\" is redundant combining \"%s\" and \"%s\"", sensorName, getSensorName(m_first), getSensorName(m_second)); } +void FrequencySensor::showInfo(const char* sensorName) const { + efiPrintf("FrequencySensor \"%s\" counter %d", sensorName, eventCounter); +} + void RedundantFordTps::showInfo(const char* sensorName) const { efiPrintf("Sensor \"%s\" is Ford-type redundant TPS combining \"%s\" and \"%s\"", sensorName, getSensorName(m_first), getSensorName(m_second)); }