auto-sync
This commit is contained in:
parent
eb1f18803e
commit
483af2de6a
|
@ -18,4 +18,7 @@ void setMazda626EngineConfiguration(engine_configuration_s *engineConfiguration)
|
||||||
|
|
||||||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
||||||
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
|
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
|
||||||
|
|
||||||
|
boardConfiguration->analogChartMode = AC_TRIGGER;
|
||||||
|
engineConfiguration->analogChartFrequency = 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,8 @@ extern board_configuration_s *boardConfiguration;
|
||||||
extern bool hasFirmwareErrorFlag;
|
extern bool hasFirmwareErrorFlag;
|
||||||
#define FULL_LOGGING_KEY "fl"
|
#define FULL_LOGGING_KEY "fl"
|
||||||
|
|
||||||
static Logging logger;
|
static char LOGGING_BUFFER[700];
|
||||||
|
static Logging logger("status loop", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
||||||
|
|
||||||
static void setWarningEnabled(int value) {
|
static void setWarningEnabled(int value) {
|
||||||
warningEnabled = value;
|
warningEnabled = value;
|
||||||
|
@ -268,8 +269,6 @@ static void printState(Engine *engine) {
|
||||||
#define INITIAL_FULL_LOG TRUE
|
#define INITIAL_FULL_LOG TRUE
|
||||||
//#define INITIAL_FULL_LOG FALSE
|
//#define INITIAL_FULL_LOG FALSE
|
||||||
|
|
||||||
static char LOGGING_BUFFER[700];
|
|
||||||
|
|
||||||
volatile int needToReportStatus = FALSE;
|
volatile int needToReportStatus = FALSE;
|
||||||
static int prevCkpEventCounter = -1;
|
static int prevCkpEventCounter = -1;
|
||||||
|
|
||||||
|
@ -630,11 +629,6 @@ static void unsubscribe(int outputOrdinal) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void initStatusLoop(Engine *engine) {
|
void initStatusLoop(Engine *engine) {
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
initLoggingExt(&logger, "status loop", LOGGING_BUFFER,
|
|
||||||
sizeof(LOGGING_BUFFER));
|
|
||||||
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
|
|
||||||
|
|
||||||
setFullLog(INITIAL_FULL_LOG);
|
setFullLog(INITIAL_FULL_LOG);
|
||||||
addConsoleActionI(FULL_LOGGING_KEY, setFullLog);
|
addConsoleActionI(FULL_LOGGING_KEY, setFullLog);
|
||||||
addConsoleActionI("warn", setWarningEnabled);
|
addConsoleActionI("warn", setWarningEnabled);
|
||||||
|
|
|
@ -59,8 +59,8 @@ void Engine::precalc(engine_configuration_s *engineConfiguration) {
|
||||||
|
|
||||||
for (int i = 0; i < MAF_DECODING_CACHE_SIZE; i++) {
|
for (int i = 0; i < MAF_DECODING_CACHE_SIZE; i++) {
|
||||||
float volts = i / MAF_DECODING_CACHE_MULT;
|
float volts = i / MAF_DECODING_CACHE_MULT;
|
||||||
float maf = interpolate2d(volts, mafDecodingBins, mafDecoding,
|
float maf = interpolate2d(volts, engineConfiguration->mafDecodingBins,
|
||||||
MAF_DECODING_COUNT);
|
engineConfiguration->mafDecoding, MAF_DECODING_COUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,10 +169,6 @@ public:
|
||||||
*/
|
*/
|
||||||
float mafDecodingLookup[MAF_DECODING_CACHE_SIZE];
|
float mafDecodingLookup[MAF_DECODING_CACHE_SIZE];
|
||||||
|
|
||||||
float mafDecoding[MAF_DECODING_COUNT];
|
|
||||||
float mafDecodingBins[MAF_DECODING_COUNT];
|
|
||||||
|
|
||||||
|
|
||||||
void precalc(engine_configuration_s *engineConfiguration);
|
void precalc(engine_configuration_s *engineConfiguration);
|
||||||
|
|
||||||
void updateSlowSensors();
|
void updateSlowSensors();
|
||||||
|
|
|
@ -32,9 +32,8 @@
|
||||||
#include "flash_main.h"
|
#include "flash_main.h"
|
||||||
#endif /* EFI_INTERNAL_FLASH */
|
#endif /* EFI_INTERNAL_FLASH */
|
||||||
|
|
||||||
static Logging logger;
|
|
||||||
|
|
||||||
static char LOGGING_BUFFER[1000];
|
static char LOGGING_BUFFER[1000];
|
||||||
|
static Logging logger("settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
||||||
|
|
||||||
extern int maxNesting;
|
extern int maxNesting;
|
||||||
extern engine_pins_s enginePins;
|
extern engine_pins_s enginePins;
|
||||||
|
@ -865,8 +864,6 @@ static void setInjectorLag(float value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void initSettings(engine_configuration_s *engineConfiguration) {
|
void initSettings(engine_configuration_s *engineConfiguration) {
|
||||||
initLoggingExt(&logger, "settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
|
||||||
|
|
||||||
addConsoleActionP("showconfig", (VoidPtr) doPrintConfiguration, &engine);
|
addConsoleActionP("showconfig", (VoidPtr) doPrintConfiguration, &engine);
|
||||||
addConsoleAction("tempinfo", printTemperatureInfo);
|
addConsoleAction("tempinfo", printTemperatureInfo);
|
||||||
addConsoleAction("tpsinfo", printTPSInfo);
|
addConsoleAction("tpsinfo", printTPSInfo);
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
||||||
|
|
||||||
static char LOGGING_BUFFER[5000];
|
static char LOGGING_BUFFER[5000];
|
||||||
static Logging logging;
|
static Logging logging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
||||||
|
|
||||||
static int pendingData = FALSE;
|
static int pendingData = FALSE;
|
||||||
static int initialized = FALSE;
|
static int initialized = FALSE;
|
||||||
|
@ -71,8 +71,6 @@ static void setAnalogChartFrequency(int value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void initAnalogChart(void) {
|
void initAnalogChart(void) {
|
||||||
initLoggingExt(&logging, "analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
|
||||||
|
|
||||||
addConsoleActionI("set_analog_chart_freq", setAnalogChartFrequency);
|
addConsoleActionI("set_analog_chart_freq", setAnalogChartFrequency);
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
|
@ -52,7 +52,7 @@ AdcDevice::AdcDevice(ADCConversionGroup* hwConfig) {
|
||||||
#define ADC_FAST_DEVICE ADCD2
|
#define ADC_FAST_DEVICE ADCD2
|
||||||
|
|
||||||
static char LOGGING_BUFFER[500];
|
static char LOGGING_BUFFER[500];
|
||||||
static Logging logger;
|
static Logging logger("ADC", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
||||||
static int adcCallbackCounter_slow = 0;
|
static int adcCallbackCounter_slow = 0;
|
||||||
|
|
||||||
static int adcDebugReporting = FALSE;
|
static int adcDebugReporting = FALSE;
|
||||||
|
@ -454,8 +454,6 @@ static void adc_callback_slow(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void initAdcInputs(bool boardTestMode) {
|
void initAdcInputs(bool boardTestMode) {
|
||||||
|
|
||||||
initLoggingExt(&logger, "ADC", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
|
||||||
printMsg(&logger, "initAdcInputs()");
|
printMsg(&logger, "initAdcInputs()");
|
||||||
|
|
||||||
printStatus();
|
printStatus();
|
||||||
|
|
|
@ -385,8 +385,14 @@ void initIntermediateLoggingBuffer(void) {
|
||||||
|
|
||||||
#endif /* ! EFI_UNIT_TEST */
|
#endif /* ! EFI_UNIT_TEST */
|
||||||
|
|
||||||
LoggingWithStorage::LoggingWithStorage(const char *name) {
|
Logging::Logging() {
|
||||||
|
}
|
||||||
|
|
||||||
|
Logging::Logging(char const *name, char *buffer, int bufferSize) {
|
||||||
#if ! EFI_UNIT_TEST
|
#if ! EFI_UNIT_TEST
|
||||||
initLoggingExt(this, name, DEFAULT_BUFFER, sizeof(DEFAULT_BUFFER));
|
initLoggingExt(this, "settings control", buffer, bufferSize);
|
||||||
#endif /* ! EFI_UNIT_TEST */
|
#endif /* ! EFI_UNIT_TEST */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoggingWithStorage::LoggingWithStorage(const char *name) : Logging(name, DEFAULT_BUFFER, sizeof(DEFAULT_BUFFER)) {
|
||||||
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
// size of buffers?
|
// size of buffers?
|
||||||
class Logging {
|
class Logging {
|
||||||
public:
|
public:
|
||||||
|
Logging();
|
||||||
|
Logging(const char *name, char *buffer, int bufferSize);
|
||||||
const char *name;
|
const char *name;
|
||||||
char SMALL_BUFFER[40];
|
char SMALL_BUFFER[40];
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue