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