map sampling logs sample count

This commit is contained in:
Matthew Kennedy 2024-08-05 21:45:23 -07:00
parent 6a10aceb16
commit d477d7c5f4
2 changed files with 7 additions and 1 deletions

View File

@ -366,5 +366,9 @@ float mapFast
uint16_t autoscale actualLastInjectionStage2;@@GAUGE_NAME_FUEL_LAST_INJECTION_STAGE_2@@;"ms",{1/@@PACK_MULT_MS@@}, 0, 0, 0, 3
uint8_t autoscale injectorDutyCycleStage2;@@GAUGE_NAME_FUEL_INJ_DUTY_STAGE_2@@;"%",{1/2}, 0, 0, 0, 0
uint8_t[117 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
uint8_t pad
uint16_t mapAveragingSamples
uint8_t[114 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
end_struct

View File

@ -107,6 +107,8 @@ void MapAverager::stop() {
m_isAveraging = false;
engine->outputChannels.mapAveragingSamples = m_counter;
if (m_counter > 0) {
float averageMap = m_sum / m_counter;
m_lastCounter = m_counter;