rusEFI
The most advanced open source ECU
|
#include <map_averaging.h>
Public Member Functions | |
MapAverager (SensorType type, efidur_t timeout) | |
void | start () |
void | stop () |
SensorResult | submit (float sensorVolts) |
void | setFunction (SensorConverter &func) |
void | showInfo (const char *sensorName) const override |
Public Member Functions inherited from StoredValueSensor | |
SensorResult | get () const final override |
StoredValueSensor (SensorType type, efidur_t timeoutNt) | |
void | invalidate () |
void | invalidate (UnexpectedCode why) |
void | setValidValue (float value, efitick_t timestamp) |
void | showInfo (const char *sensorName) const override |
virtual void | setTimeout (int timeoutMs) |
Public Member Functions inherited from Sensor | |
bool | Register () |
const char * | getSensorName () const |
virtual bool | hasSensor () const |
virtual float | getRaw () const |
virtual bool | isRedundant () const |
void | unregister () |
SensorType | type () const |
Private Attributes | |
SensorConverter * | m_function = nullptr |
bool | m_isAveraging = false |
size_t | m_counter = 0 |
size_t | m_lastCounter = 0 |
float | m_sum = 0 |
Additional Inherited Members | |
Static Public Member Functions inherited from Sensor | |
static void | showAllSensorInfo () |
static void | showInfo (SensorType type) |
static void | resetRegistry () |
static const Sensor * | getSensorOfType (SensorType type) |
static SensorResult | get (SensorType type) |
static float | getOrZero (SensorType type) |
static float | getRaw (SensorType type) |
static bool | isRedundant (SensorType type) |
static bool | hasSensor (SensorType type) |
static void | setMockValue (SensorType type, float value, bool mockRedundant=false) |
static void | setInvalidMockValue (SensorType type) |
static void | setMockValue (int type, float value) |
static void | resetMockValue (SensorType type) |
static void | resetAllMocks () |
static void | inhibitTimeouts (bool inhibit) |
static const char * | getSensorName (SensorType type) |
Protected Member Functions inherited from Sensor | |
Sensor (SensorType type) | |
Static Protected Attributes inherited from Sensor | |
static bool | s_inhibitSensorTimeouts = false |
Definition at line 33 of file map_averaging.h.
|
inline |
Definition at line 35 of file map_averaging.h.
|
inline |
Definition at line 45 of file map_averaging.h.
Referenced by initMap().
|
overridevirtual |
Implements Sensor.
Definition at line 76 of file sensor_info_printing.cpp.
void MapAverager::start | ( | ) |
Definition at line 79 of file map_averaging.cpp.
void MapAverager::stop | ( | ) |
Definition at line 100 of file map_averaging.cpp.
Referenced by endAveraging().
SensorResult MapAverager::submit | ( | float | sensorVolts | ) |
Definition at line 87 of file map_averaging.cpp.
Referenced by mapAveragingAdcCallback().
|
private |
Definition at line 55 of file map_averaging.h.
|
private |
Definition at line 52 of file map_averaging.h.
Referenced by setFunction(), and submit().
|
private |
Definition at line 54 of file map_averaging.h.
|
private |
Definition at line 56 of file map_averaging.h.
Referenced by showInfo(), and stop().
|
private |
Definition at line 57 of file map_averaging.h.