small can board

This commit is contained in:
Matthew Kennedy 2023-11-03 15:50:39 -07:00
parent 93cf484081
commit 9474781a46
2 changed files with 11 additions and 12 deletions

View File

@ -98,8 +98,6 @@ static int packEngineMode() {
engineConfiguration->ignitionMode;
}
static int prevCkpEventCounter = -1;
/**
* Time when the firmware version was last reported
* TODO: implement a request/response instead of just constantly sending this out
@ -184,8 +182,6 @@ void printOverallStatus() {
}
}
static systime_t timeOfPreviousReport = (systime_t) -1;
#if !defined(LOGIC_ANALYZER_BUFFER_SIZE)
// TODO: how small can this be?
#define LOGIC_ANALYZER_BUFFER_SIZE 1000
@ -215,9 +211,12 @@ void updateDevConsoleState() {
printFullAdcReportIfNeeded();
#endif /* HAL_USE_ADC */
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
systime_t nowSeconds = getTimeNowS();
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
static systime_t timeOfPreviousReport = (systime_t) -1;
static int prevCkpEventCounter = -1;
int currentCkpEventCounter = engine->triggerCentral.triggerState.getTotalEventCounter();
if (prevCkpEventCounter == currentCkpEventCounter && timeOfPreviousReport == nowSeconds) {
return;

View File

@ -28,9 +28,6 @@
#include "engine_sniffer.h"
// a bit weird because of conditional compilation
static char shaft_signal_msg_index[15];
#if EFI_ENGINE_SNIFFER
#define addEngineSnifferEvent(name, msg) { if (getTriggerCentral()->isEngineSnifferEnabled) { waveChart.addEvent3((name), (msg)); } }
#else
@ -45,6 +42,8 @@ static char shaft_signal_msg_index[15];
#define CHART_DELIMETER '!'
extern WaveChart waveChart;
static char shaft_signal_msg_index[15];
/**
* This is the number of events in the digital chart which would be displayed
* on the 'digital sniffer' pane
@ -242,8 +241,6 @@ void initWaveChart(WaveChart *chart) {
#endif // EFI_UNIT_TEST
}
#endif /* EFI_ENGINE_SNIFFER */
void addEngineSnifferOutputPinEvent(NamedOutputPin *pin, bool isRise) {
if (!engineConfiguration->engineSnifferFocusOnInputs) {
addEngineSnifferEvent(pin->getShortName(), isRise ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN);
@ -253,9 +250,9 @@ void addEngineSnifferOutputPinEvent(NamedOutputPin *pin, bool isRise) {
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);
}
@ -282,3 +279,6 @@ void addEngineSnifferVvtEvent(int vvtIndex, bool isRise) {
addEngineSnifferEvent(vvtName, isRise ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN);
}
#endif /* EFI_ENGINE_SNIFFER */