auto-sync

This commit is contained in:
rusEfi 2015-02-11 19:07:15 -06:00
parent eb1f18803e
commit 483af2de6a
9 changed files with 20 additions and 26 deletions

View File

@ -18,4 +18,7 @@ void setMazda626EngineConfiguration(engine_configuration_s *engineConfiguration)
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
boardConfiguration->analogChartMode = AC_TRIGGER;
engineConfiguration->analogChartFrequency = 2;
}

View File

@ -82,7 +82,8 @@ extern board_configuration_s *boardConfiguration;
extern bool hasFirmwareErrorFlag;
#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) {
warningEnabled = value;
@ -268,8 +269,6 @@ static void printState(Engine *engine) {
#define INITIAL_FULL_LOG TRUE
//#define INITIAL_FULL_LOG FALSE
static char LOGGING_BUFFER[700];
volatile int needToReportStatus = FALSE;
static int prevCkpEventCounter = -1;
@ -630,11 +629,6 @@ static void unsubscribe(int outputOrdinal) {
}
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);
addConsoleActionI(FULL_LOGGING_KEY, setFullLog);
addConsoleActionI("warn", setWarningEnabled);

View File

@ -59,8 +59,8 @@ void Engine::precalc(engine_configuration_s *engineConfiguration) {
for (int i = 0; i < MAF_DECODING_CACHE_SIZE; i++) {
float volts = i / MAF_DECODING_CACHE_MULT;
float maf = interpolate2d(volts, mafDecodingBins, mafDecoding,
MAF_DECODING_COUNT);
float maf = interpolate2d(volts, engineConfiguration->mafDecodingBins,
engineConfiguration->mafDecoding, MAF_DECODING_COUNT);
}
}

View File

@ -169,10 +169,6 @@ public:
*/
float mafDecodingLookup[MAF_DECODING_CACHE_SIZE];
float mafDecoding[MAF_DECODING_COUNT];
float mafDecodingBins[MAF_DECODING_COUNT];
void precalc(engine_configuration_s *engineConfiguration);
void updateSlowSensors();

View File

@ -32,9 +32,8 @@
#include "flash_main.h"
#endif /* EFI_INTERNAL_FLASH */
static Logging logger;
static char LOGGING_BUFFER[1000];
static Logging logger("settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
extern int maxNesting;
extern engine_pins_s enginePins;
@ -865,8 +864,6 @@ static void setInjectorLag(float value) {
}
void initSettings(engine_configuration_s *engineConfiguration) {
initLoggingExt(&logger, "settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
addConsoleActionP("showconfig", (VoidPtr) doPrintConfiguration, &engine);
addConsoleAction("tempinfo", printTemperatureInfo);
addConsoleAction("tpsinfo", printTPSInfo);

View File

@ -14,7 +14,7 @@
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
static char LOGGING_BUFFER[5000];
static Logging logging;
static Logging logging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
static int pendingData = FALSE;
static int initialized = FALSE;
@ -71,8 +71,6 @@ static void setAnalogChartFrequency(int value) {
}
void initAnalogChart(void) {
initLoggingExt(&logging, "analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
addConsoleActionI("set_analog_chart_freq", setAnalogChartFrequency);
initialized = true;

View File

@ -52,7 +52,7 @@ AdcDevice::AdcDevice(ADCConversionGroup* hwConfig) {
#define ADC_FAST_DEVICE ADCD2
static char LOGGING_BUFFER[500];
static Logging logger;
static Logging logger("ADC", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
static int adcCallbackCounter_slow = 0;
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) {
initLoggingExt(&logger, "ADC", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
printMsg(&logger, "initAdcInputs()");
printStatus();

View File

@ -385,8 +385,14 @@ void initIntermediateLoggingBuffer(void) {
#endif /* ! EFI_UNIT_TEST */
LoggingWithStorage::LoggingWithStorage(const char *name) {
Logging::Logging() {
}
Logging::Logging(char const *name, char *buffer, int bufferSize) {
#if ! EFI_UNIT_TEST
initLoggingExt(this, name, DEFAULT_BUFFER, sizeof(DEFAULT_BUFFER));
initLoggingExt(this, "settings control", buffer, bufferSize);
#endif /* ! EFI_UNIT_TEST */
}
LoggingWithStorage::LoggingWithStorage(const char *name) : Logging(name, DEFAULT_BUFFER, sizeof(DEFAULT_BUFFER)) {
}

View File

@ -18,6 +18,8 @@
// size of buffers?
class Logging {
public:
Logging();
Logging(const char *name, char *buffer, int bufferSize);
const char *name;
char SMALL_BUFFER[40];
/**