send more of Engine Sniffer data #4560
This commit is contained in:
parent
d921d5cd22
commit
7bc7299db1
|
@ -308,7 +308,6 @@ float RpmCalculator::getSecondsSinceEngineStart(efitick_t nowNt) const {
|
|||
return engineStartTimer.getElapsedSeconds(nowNt);
|
||||
}
|
||||
|
||||
static char rpmBuffer[_MAX_FILLER];
|
||||
|
||||
/**
|
||||
* This callback has nothing to do with actual engine control, it just sends a Top Dead Center mark to the rusEfi console
|
||||
|
@ -321,11 +320,8 @@ static void onTdcCallback(void *) {
|
|||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
itoa10(rpmBuffer, Sensor::getOrZero(SensorType::Rpm));
|
||||
#if EFI_ENGINE_SNIFFER
|
||||
waveChart.startDataCollection();
|
||||
#endif
|
||||
addEngineSnifferEvent(TOP_DEAD_CENTER_MESSAGE, (char* ) rpmBuffer);
|
||||
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
addEngineSnifferTdcEvent(rpm);
|
||||
#if EFI_TOOTH_LOGGER
|
||||
LogTriggerTopDeadCenter(getTimeNowNt());
|
||||
#endif /* EFI_TOOTH_LOGGER */
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "status_loop.h"
|
||||
|
||||
#define CHART_DELIMETER '!'
|
||||
extern WaveChart waveChart;
|
||||
|
||||
extern uint32_t maxLockedDuration;
|
||||
|
||||
|
@ -142,6 +143,15 @@ void WaveChart::publish() {
|
|||
}
|
||||
}
|
||||
|
||||
void addEngineSnifferTdcEvent(int rpm) {
|
||||
static char rpmBuffer[_MAX_FILLER];
|
||||
itoa10(rpmBuffer, rpm);
|
||||
#if EFI_ENGINE_SNIFFER
|
||||
waveChart.startDataCollection();
|
||||
#endif
|
||||
addEngineSnifferEvent(TOP_DEAD_CENTER_MESSAGE, (char* ) rpmBuffer);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register an event for digital sniffer
|
||||
*/
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
#if EFI_ENGINE_SNIFFER
|
||||
#include "datalogging.h"
|
||||
|
||||
void addEngineSnifferTdcEvent(int rpm);
|
||||
void addEngineSnifferCrankEvent(int signalType, int index, int isUp);
|
||||
void addEngineSnifferVvtEvent(int vvtType, int isUp);
|
||||
void addEngineSnifferOutputPinEvent(int outputPinType, int isUp);
|
||||
|
||||
/**
|
||||
* @brief rusEfi console sniffer data buffer
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue