void WaveChart::publish() { appendPrintf(&logging, DELIMETER); waveChartUsedSize = loggingSize(&logging); #if DEBUG_WAVE Logging *l = &chart->logging; scheduleSimpleMsg(&debugLogging, "IT'S TIME", strlen(l->buffer)); #endif bool isFullLog = getFullLog(); if (ENGINE(isEngineChartEnabled) && isFullLog) { scheduleLogging(&logging); } }
void publishChart(WaveChart *chart) { appendPrintf(&chart->logging, DELIMETER); waveChartUsedSize = loggingSize(&chart->logging); #if DEBUG_WAVE Logging *l = &chart->logging; scheduleSimpleMsg(&debugLogging, "IT'S TIME", strlen(l->buffer)); #endif bool isFullLog = getFullLog(); if (isChartActive && isFullLog) { scheduleLogging(&chart->logging); } }
void scAddData(float angle, float value) { if (!initialized) { return; // this is possible because of initialization sequence } if (engineConfiguration->sensorChartFrequency < 2) { /** * analog chart frequency cannot be 1 because of the way * data flush is implemented, see below */ //todofirmwareError() return; } if (getRevolutionCounter() % engineConfiguration->sensorChartFrequency != 0) { /** * We are here if we do NOT need to add an event to the analog chart */ if (pendingData) { /** * We are here if that's the first time we do not need to add * data after we have added some data - meaning it's time to flush */ // message terminator appendPrintf(&logging, DELIMETER); // output pending data #if EFI_PROD_CODE || defined(__DOXYGEN__) if (getFullLog()) { scheduleLogging(&logging); } #endif pendingData = false; } return; } if (!pendingData) { pendingData = true; resetLogging(&logging); // message header appendPrintf(&logging, "analog_chart%s", DELIMETER); } if (remainingSize(&logging) > 100) { appendPrintf(&logging, "%f|%f|", angle, value); } }