rusEFI
The most advanced open source ECU
|
#include <trip_odometer.h>
Public Member Functions | |
void | onSlowCallback () override |
void | reset () |
void | consumeFuel (float grams, efitick_t nowNt) |
uint32_t | getConsumedGrams () const |
float | getConsumedGramsRemainder () const |
float | getConsumptionGramPerSecond () const |
uint32_t | getDistanceMeters () const |
uint32_t | getIgnitionOnTime () const |
uint32_t | getEngineRunTime () const |
![]() | |
virtual void | initNoConfiguration () |
virtual void | setDefaultConfiguration () |
virtual void | onConfigurationChange (engine_configuration_s const *) |
virtual void | onFastCallback () |
virtual void | onEngineStop () |
virtual void | onIgnitionStateChanged (bool) |
virtual bool | needsDelayedShutoff () |
virtual void | onEnginePhase (float, efitick_t, angle_t, angle_t) |
Private Attributes | |
uint32_t | m_consumedGrams = 0 |
float | m_consumedRemainder = 0 |
float | m_rate = 0 |
uint32_t | m_distanceMeters = 0 |
float | m_distanceRemainder = 0 |
uint32_t | m_slowCallbackCounter = 0 |
uint32_t | m_ignitionOnSeconds = 0 |
uint32_t | m_engineRunningSeconds = 0 |
Timer | m_timer |
Definition at line 3 of file trip_odometer.h.
void TripOdometer::consumeFuel | ( | float | grams, |
efitick_t | nowNt | ||
) |
Definition at line 15 of file trip_odometer.cpp.
uint32_t TripOdometer::getConsumedGrams | ( | ) | const |
Definition at line 44 of file trip_odometer.cpp.
Referenced by configureRusefiLuaHooks().
|
inline |
Definition at line 12 of file trip_odometer.h.
Referenced by configureRusefiLuaHooks().
float TripOdometer::getConsumptionGramPerSecond | ( | ) | const |
Definition at line 48 of file trip_odometer.cpp.
Referenced by configureRusefiLuaHooks().
uint32_t TripOdometer::getDistanceMeters | ( | ) | const |
Definition at line 77 of file trip_odometer.cpp.
uint32_t TripOdometer::getEngineRunTime | ( | ) | const |
Definition at line 85 of file trip_odometer.cpp.
uint32_t TripOdometer::getIgnitionOnTime | ( | ) | const |
Definition at line 81 of file trip_odometer.cpp.
|
overridevirtual |
Reimplemented from EngineModule.
Definition at line 52 of file trip_odometer.cpp.
void TripOdometer::reset | ( | ) |
Definition at line 3 of file trip_odometer.cpp.
|
private |
Definition at line 22 of file trip_odometer.h.
Referenced by consumeFuel(), getConsumedGrams(), and reset().
|
private |
Definition at line 23 of file trip_odometer.h.
Referenced by consumeFuel(), getConsumedGramsRemainder(), and reset().
|
private |
Definition at line 27 of file trip_odometer.h.
Referenced by getDistanceMeters(), onSlowCallback(), and reset().
|
private |
Definition at line 28 of file trip_odometer.h.
Referenced by onSlowCallback(), and reset().
|
private |
Definition at line 33 of file trip_odometer.h.
Referenced by getEngineRunTime(), onSlowCallback(), and reset().
|
private |
Definition at line 32 of file trip_odometer.h.
Referenced by getIgnitionOnTime(), onSlowCallback(), and reset().
|
private |
Definition at line 24 of file trip_odometer.h.
Referenced by consumeFuel(), and getConsumptionGramPerSecond().
|
private |
Definition at line 31 of file trip_odometer.h.
Referenced by onSlowCallback(), and reset().
|
private |
Definition at line 35 of file trip_odometer.h.
Referenced by consumeFuel().