auto-sync
This commit is contained in:
parent
6d0dc8247d
commit
08a15e4647
|
@ -289,6 +289,7 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
||||||
engineConfiguration->hasAfrSensor = true;
|
engineConfiguration->hasAfrSensor = true;
|
||||||
engineConfiguration->hasCltSensor = true;
|
engineConfiguration->hasCltSensor = true;
|
||||||
engineConfiguration->hasBaroSensor = false;
|
engineConfiguration->hasBaroSensor = false;
|
||||||
|
engineConfiguration->isDigitalChartEnabled = true;
|
||||||
|
|
||||||
boardConfiguration->idleSolenoidFrequency = 200;
|
boardConfiguration->idleSolenoidFrequency = 200;
|
||||||
// engineConfiguration->idleMode = IM_AUTO;
|
// engineConfiguration->idleMode = IM_AUTO;
|
||||||
|
|
|
@ -447,6 +447,7 @@ typedef struct {
|
||||||
bool_t hasBaroSensor : 1; // bit 1
|
bool_t hasBaroSensor : 1; // bit 1
|
||||||
bool_t hasAfrSensor : 1; // bit 2
|
bool_t hasAfrSensor : 1; // bit 2
|
||||||
bool_t useConstantDwellDuringCranking : 1; // bit 3
|
bool_t useConstantDwellDuringCranking : 1; // bit 3
|
||||||
|
bool_t isDigitalChartEnabled : 1; // bit 4
|
||||||
// that's the next 32 bit field
|
// that's the next 32 bit field
|
||||||
int hasCltSensor;
|
int hasCltSensor;
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ static histogram_s waveChartHisto;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
extern uint32_t maxLockTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the number of events in the digital chart which would be displayed
|
* This is the number of events in the digital chart which would be displayed
|
||||||
|
@ -55,9 +56,6 @@ EXTERN_ENGINE;
|
||||||
|
|
||||||
int waveChartUsedSize;
|
int waveChartUsedSize;
|
||||||
|
|
||||||
static int isChartActive = true;
|
|
||||||
//static int isChartActive = false;
|
|
||||||
|
|
||||||
//#define DEBUG_WAVE 1
|
//#define DEBUG_WAVE 1
|
||||||
|
|
||||||
#if DEBUG_WAVE
|
#if DEBUG_WAVE
|
||||||
|
@ -95,13 +93,14 @@ bool_t WaveChart::isWaveChartFull() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printStatus(void) {
|
static void printStatus(void) {
|
||||||
scheduleIntValue(&logger, "chart", isChartActive);
|
scheduleMsg(&logger, "digital chart: %s", boolToString(engineConfiguration->isDigitalChartEnabled));
|
||||||
scheduleIntValue(&logger, "chartsize", engineConfiguration->digitalChartSize);
|
scheduleMsg(&logger, "chartsize=%d", engineConfiguration->digitalChartSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setChartActive(int value) {
|
static void setChartActive(int value) {
|
||||||
isChartActive = value;
|
engineConfiguration->isDigitalChartEnabled = value;
|
||||||
printStatus();
|
printStatus();
|
||||||
|
maxLockTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setChartSize(int newSize) {
|
void setChartSize(int newSize) {
|
||||||
|
@ -133,7 +132,7 @@ void WaveChart::publishChart() {
|
||||||
scheduleSimpleMsg(&debugLogging, "IT'S TIME", strlen(l->buffer));
|
scheduleSimpleMsg(&debugLogging, "IT'S TIME", strlen(l->buffer));
|
||||||
#endif
|
#endif
|
||||||
bool isFullLog = getFullLog();
|
bool isFullLog = getFullLog();
|
||||||
if (isChartActive && isFullLog) {
|
if (engineConfiguration->isDigitalChartEnabled && isFullLog) {
|
||||||
scheduleLogging(&logging);
|
scheduleLogging(&logging);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,7 +143,7 @@ static char timeBuffer[10];
|
||||||
* @brief Register an event for digital sniffer
|
* @brief Register an event for digital sniffer
|
||||||
*/
|
*/
|
||||||
void WaveChart::addWaveChartEvent3(const char *name, const char * msg) {
|
void WaveChart::addWaveChartEvent3(const char *name, const char * msg) {
|
||||||
if(!isChartActive) {
|
if(!engineConfiguration->isDigitalChartEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +218,7 @@ void showWaveChartHistogram(void) {
|
||||||
void initWaveChart(WaveChart *chart) {
|
void initWaveChart(WaveChart *chart) {
|
||||||
initLogging(&logger, "wave info");
|
initLogging(&logger, "wave info");
|
||||||
|
|
||||||
if (!isChartActive) {
|
if (!engineConfiguration->isDigitalChartEnabled) {
|
||||||
printMsg(&logger, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! chart disabled");
|
printMsg(&logger, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! chart disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,8 @@ void writeToFlashIfPending() {
|
||||||
writeToFlash();
|
writeToFlash();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern uint32_t maxLockTime;
|
||||||
|
|
||||||
void writeToFlash(void) {
|
void writeToFlash(void) {
|
||||||
#if EFI_INTERNAL_FLASH
|
#if EFI_INTERNAL_FLASH
|
||||||
scheduleMsg(&logger, " !!!!!!!!!!!!!!!!!!!! BE SURE NOT WRITE WITH IGNITION ON !!!!!!!!!!!!!!!!!!!!");
|
scheduleMsg(&logger, " !!!!!!!!!!!!!!!!!!!! BE SURE NOT WRITE WITH IGNITION ON !!!!!!!!!!!!!!!!!!!!");
|
||||||
|
@ -77,6 +79,7 @@ void writeToFlash(void) {
|
||||||
scheduleMsg(&logger, "Flash programmed in (ms): %d", currentTimeMillis() - nowMs);
|
scheduleMsg(&logger, "Flash programmed in (ms): %d", currentTimeMillis() - nowMs);
|
||||||
scheduleMsg(&logger, "Flashing result: %d", result);
|
scheduleMsg(&logger, "Flashing result: %d", result);
|
||||||
#endif /* EFI_INTERNAL_FLASH */
|
#endif /* EFI_INTERNAL_FLASH */
|
||||||
|
maxLockTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isValidCrc(persistent_config_container_s *state) {
|
static bool isValidCrc(persistent_config_container_s *state) {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#define FLASH_DATA_VERSION 5386
|
#define FLASH_DATA_VERSION 5452
|
||||||
|
|
||||||
void readFromFlash(void);
|
void readFromFlash(void);
|
||||||
void initFlash(Engine *engine);
|
void initFlash(Engine *engine);
|
||||||
|
|
|
@ -53,8 +53,6 @@ AdcConfiguration::AdcConfiguration(ADCConversionGroup* hwConfig) {
|
||||||
|
|
||||||
#define ADC_FAST_DEVICE ADCD2
|
#define ADC_FAST_DEVICE ADCD2
|
||||||
|
|
||||||
#define ADC_DEBUG_KEY "adcDebug"
|
|
||||||
|
|
||||||
static char LOGGING_BUFFER[500];
|
static char LOGGING_BUFFER[500];
|
||||||
static Logging logger;
|
static Logging logger;
|
||||||
static int adcCallbackCounter_slow = 0;
|
static int adcCallbackCounter_slow = 0;
|
||||||
|
@ -434,7 +432,7 @@ static void printFullAdcReport(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printStatus(void) {
|
static void printStatus(void) {
|
||||||
scheduleIntValue(&logger, ADC_DEBUG_KEY, adcDebugReporting);
|
scheduleMsg(&logger, "adcDebug=%d", adcDebugReporting);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setAdcDebugReporting(int value) {
|
static void setAdcDebugReporting(int value) {
|
||||||
|
@ -485,7 +483,7 @@ void initAdcInputs(bool boardTestMode) {
|
||||||
|
|
||||||
printStatus();
|
printStatus();
|
||||||
|
|
||||||
addConsoleActionI(ADC_DEBUG_KEY, &setAdcDebugReporting);
|
addConsoleActionI("adcDebug", &setAdcDebugReporting);
|
||||||
|
|
||||||
#if EFI_INTERNAL_ADC
|
#if EFI_INTERNAL_ADC
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue