auto-sync

This commit is contained in:
rusEfi 2015-01-01 18:03:31 -06:00
parent de215ba1ea
commit f2cc8a60c5
15 changed files with 50 additions and 72 deletions

View File

@ -67,22 +67,19 @@
// this 'true' value is needed for simulator
static volatile bool fullLog = true;
int warningEnabled = TRUE;
int warningEnabled = true;
//int warningEnabled = FALSE;
extern board_configuration_s *boardConfiguration;
extern bool hasFirmwareErrorFlag;
#define FULL_LOGGING_KEY "fl"
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
static Logging logger;
static void setWarningEnabled(int value) {
warningEnabled = value;
}
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
static Logging fileLogger;
#endif /* EFI_FILE_LOGGING */

View File

@ -1,3 +1,2 @@
CONSOLEUTILSRC = $(PROJECT_DIR)/console_util/datalogging.c \
$(PROJECT_DIR)/console_util/rfiutil.c
CONSOLEUTILSRC = $(PROJECT_DIR)/console_util/rfiutil.c

View File

@ -46,14 +46,14 @@ int mylog10(int param) {
return mylog10(param / 10) + 1;
}
*/
/*
char hexChar(int v) {
v = v & 0xF;
if (v < 10)
return (char)('0' + v);
return 'A' - 10 + v;
}
*/
// todo: make this a macro?
int isIsrContext(void) {
/**

View File

@ -21,9 +21,7 @@
#define isRunningBenchTest() true
#endif
#if EFI_PROD_CODE || EFI_SIMULATOR
static Logging logger;
#endif
EXTERN_ENGINE
;
@ -54,17 +52,13 @@ void Engine::precalc(engine_configuration_s *engineConfiguration) {
}
void Engine::init() {
#if EFI_PROD_CODE || EFI_SIMULATOR
initLogging(&logger, "engine");
#endif
}
static bool stopPin(io_pin_e pin) {
if (getOutputPinValue(pin)) {
setOutputPinValue(pin, 0);
#if EFI_PROD_CODE || EFI_SIMULATOR
scheduleMsg(&logger, "turning off %s", getPinName(pin));
#endif
return true;
}
return false;
@ -120,15 +114,10 @@ void StartupFuelPumping::setPumpsCounter(engine_configuration_s *engineConfigura
pumpsCounter = newValue;
if (pumpsCounter == PUMPS_TO_PRIME) {
#if EFI_PROD_CODE || EFI_SIMULATOR
scheduleMsg(&logger, "let's squirt prime pulse %f", pumpsCounter);
#endif
pumpsCounter = 0;
} else {
#if EFI_PROD_CODE || EFI_SIMULATOR
scheduleMsg(&logger, "setPumpsCounter %d", pumpsCounter);
#endif
}
}
}

View File

@ -39,17 +39,13 @@ EXTERN_ENGINE;
extern WaveChart waveChart;
#endif
#if EFI_PROD_CODE || EFI_SIMULATOR
static Logging logger;
#endif
extern OutputPin outputs[IO_PIN_COUNT];
extern pin_output_mode_e *pinDefaultState[IO_PIN_COUNT];
void initSignalExecutor(void) {
#if EFI_PROD_CODE || EFI_SIMULATOR
initLogging(&logger, "s exec");
#endif
initSignalExecutorImpl();
}

View File

@ -38,14 +38,9 @@ extern WaveChart waveChart;
#define TOP_DEAD_CENTER_MESSAGE "r"
EXTERN_ENGINE
;
EXTERN_ENGINE;
#if EFI_PROD_CODE || EFI_SIMULATOR
static Logging logger;
EXTERN_ENGINE
;
#endif
RpmCalculator::RpmCalculator() {
#if !EFI_PROD_CODE

View File

@ -330,9 +330,9 @@
<state>$PROJ_DIR$\..\config\stm32f4ems</state>
<state>$PROJ_DIR$\..\console\tunerstudio</state>
<state>$PROJ_DIR$\..\console_util</state>
<state>$PROJ_DIR$\..\emulation</state>
<state>$PROJ_DIR$\..\emulation\test</state>
<state>$PROJ_DIR$\..\emulation\hw_layer</state>
<state>$PROJ_DIR$\..\development</state>
<state>$PROJ_DIR$\..\development\test</state>
<state>$PROJ_DIR$\..\development\hw_layer</state>
<state>$PROJ_DIR$\..\hw_layer\algo</state>
<state>$PROJ_DIR$\..\hw_layer\lcd</state>
<state>$PROJ_DIR$\..\hw_layer\stm32f4</state>
@ -340,8 +340,8 @@
<state>$PROJ_DIR$\..\hw_layer</state>
<state>$PROJ_DIR$\..\ext</state>
<state>$PROJ_DIR$\..\ext_algo</state>
<state>$PROJ_DIR$\..\emulation</state>
<state>$PROJ_DIR$\..\emulation\hw_layer</state>
<state>$PROJ_DIR$\..\development</state>
<state>$PROJ_DIR$\..\development\hw_layer</state>
<state>$PROJ_DIR$\..\util</state>
</option>
<option>
@ -2195,12 +2195,6 @@
<file>
<name>$PROJ_DIR$\..\controllers\algo\obd_error_codes.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\algo\OutputSignalArray.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\algo\OutputSignalList.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\algo\rusefi_enums.h</name>
</file>
@ -2210,17 +2204,11 @@
<file>
<name>$PROJ_DIR$\..\controllers\algo\signal_executor.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\algo\wave_chart.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\algo\wave_chart.h</name>
</file>
</group>
<group>
<name>core</name>
<file>
<name>$PROJ_DIR$\..\controllers\core\avg_values.c</name>
<name>$PROJ_DIR$\..\controllers\core\avg_values.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\core\avg_values.h</name>
@ -2510,60 +2498,66 @@
</file>
</group>
<group>
<name>emulation</name>
<name>development</name>
<group>
<name>hw_layer</name>
<file>
<name>$PROJ_DIR$\..\emulation\hw_layer\poten.c</name>
<name>$PROJ_DIR$\..\development\hw_layer\poten.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\hw_layer\poten.h</name>
<name>$PROJ_DIR$\..\development\hw_layer\poten.h</name>
</file>
</group>
<group>
<name>test</name>
<file>
<name>$PROJ_DIR$\..\emulation\test\test.c</name>
<name>$PROJ_DIR$\..\development\test\test.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\test\test.h</name>
<name>$PROJ_DIR$\..\development\test\test.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\test\testbmk.c</name>
<name>$PROJ_DIR$\..\development\test\testbmk.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\test\testbmk.h</name>
<name>$PROJ_DIR$\..\development\test\testbmk.h</name>
</file>
</group>
<file>
<name>$PROJ_DIR$\..\emulation\analog_chart.cpp</name>
<name>$PROJ_DIR$\..\development\analog_chart.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\analog_chart.h</name>
<name>$PROJ_DIR$\..\development\analog_chart.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\engine_emulator.cpp</name>
<name>$PROJ_DIR$\..\development\engine_emulator.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\engine_emulator.h</name>
<name>$PROJ_DIR$\..\development\engine_emulator.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\rfi_perftest.cpp</name>
<name>$PROJ_DIR$\..\development\rfi_perftest.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\rfi_perftest.h</name>
<name>$PROJ_DIR$\..\development\rfi_perftest.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\trigger_emulator.cpp</name>
<name>$PROJ_DIR$\..\development\trigger_emulator.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\trigger_emulator.h</name>
<name>$PROJ_DIR$\..\development\trigger_emulator.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\wave_analyzer.cpp</name>
<name>$PROJ_DIR$\..\development\wave_analyzer.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\emulation\wave_analyzer.h</name>
<name>$PROJ_DIR$\..\development\wave_analyzer.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\development\wave_chart.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\development\wave_chart.h</name>
</file>
</group>
<group>

View File

@ -32,11 +32,11 @@
#include <stdbool.h>
#include "main.h"
#include "rfiutil.h"
#include "chprintf.h"
#include "chmtx.h"
#include "memstreams.h"
#include "console_io.h"
#include "rfiutil.h"
// we use this magic constant to make sure it's not just a random non-zero int in memory
#define MAGIC_LOGGING_FLAG 45234441

View File

@ -1,8 +1,11 @@
UTILSRC = $(PROJECT_DIR)/util/data_buffer.c \
$(PROJECT_DIR)/util/crc.c \
UTIL_TEST_SRC = $(PROJECT_DIR)/util/crc.c \
$(PROJECT_DIR)/util/data_buffer.c \
$(PROJECT_DIR)/util/histogram.c \
$(PROJECT_DIR)/util/cli_registry.c
UTILSRC = $(UTIL_TEST_SRC) \
$(PROJECT_DIR)/console_util/datalogging.c
UTILSRC_CPP = $(PROJECT_DIR)/util/cyclic_buffer.cpp \
$(PROJECT_DIR)/util/listener_array.cpp \

View File

@ -75,7 +75,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="controllers_system/signal_executor_sleep.c|controllers_system/SingleTimerExecutor.cpp|controllers_trigger/trigger_emulator_algo.cpp|controllers_trigger/trigger_central.c|controllers_trigger/rpm_calculator.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="util/datalogging.c|controllers_system/signal_executor_sleep.c|controllers_system/SingleTimerExecutor.cpp|controllers_trigger/trigger_emulator_algo.cpp|controllers_trigger/trigger_central.c|controllers_trigger/rpm_calculator.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@ -123,7 +123,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="controllers_system/signal_executor_sleep.c|controllers_system/SingleTimerExecutor.cpp|controllers_trigger/trigger_emulator_algo.cpp|controllers_trigger/trigger_central.c|controllers_trigger/rpm_calculator.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="util/datalogging.c|controllers_system/signal_executor_sleep.c|controllers_system/SingleTimerExecutor.cpp|controllers_trigger/trigger_emulator_algo.cpp|controllers_trigger/trigger_central.c|controllers_trigger/rpm_calculator.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>

View File

@ -84,7 +84,7 @@ include test.mk
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(UTILSRC) \
CSRC = $(UTIL_TEST_SRC) \
$(CONTROLLERS_ALGO_SRC) \
$(CONTROLLERS_CORE_SRC) \
$(CONTROLLERS_MATH_SRC) \

View File

@ -26,8 +26,6 @@
typedef int bool_t;
typedef void * Logging;
#define EFI_ERROR_CODE 0xffffffff
#define TRUE 1
#define FALSE 0

View File

@ -176,3 +176,9 @@ int warning(const char *fmt, ...) {
bool isCranking(void) {
return 0;
}
void initLogging(Logging *logging, const char *name) {
}
void scheduleMsg(Logging *logging, const char *fmt, ...) {
}

View File

@ -15,6 +15,7 @@
#include "global.h"
#include "error_handling.h"
#include "efifeatures.h"
#include "datalogging.h"
#include "efilib.h"
#include "efitime.h"