auto-sync
This commit is contained in:
parent
de215ba1ea
commit
f2cc8a60c5
|
@ -67,22 +67,19 @@
|
||||||
|
|
||||||
// this 'true' value is needed for simulator
|
// this 'true' value is needed for simulator
|
||||||
static volatile bool fullLog = true;
|
static volatile bool fullLog = true;
|
||||||
int warningEnabled = TRUE;
|
int warningEnabled = true;
|
||||||
//int warningEnabled = FALSE;
|
//int warningEnabled = FALSE;
|
||||||
|
|
||||||
extern board_configuration_s *boardConfiguration;
|
extern board_configuration_s *boardConfiguration;
|
||||||
extern bool hasFirmwareErrorFlag;
|
extern bool hasFirmwareErrorFlag;
|
||||||
#define FULL_LOGGING_KEY "fl"
|
#define FULL_LOGGING_KEY "fl"
|
||||||
|
|
||||||
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
|
||||||
static Logging logger;
|
static Logging logger;
|
||||||
|
|
||||||
static void setWarningEnabled(int value) {
|
static void setWarningEnabled(int value) {
|
||||||
warningEnabled = value;
|
warningEnabled = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
|
|
||||||
|
|
||||||
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
|
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
|
||||||
static Logging fileLogger;
|
static Logging fileLogger;
|
||||||
#endif /* EFI_FILE_LOGGING */
|
#endif /* EFI_FILE_LOGGING */
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
|
|
||||||
CONSOLEUTILSRC = $(PROJECT_DIR)/console_util/datalogging.c \
|
CONSOLEUTILSRC = $(PROJECT_DIR)/console_util/rfiutil.c
|
||||||
$(PROJECT_DIR)/console_util/rfiutil.c
|
|
|
@ -46,14 +46,14 @@ int mylog10(int param) {
|
||||||
return mylog10(param / 10) + 1;
|
return mylog10(param / 10) + 1;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
char hexChar(int v) {
|
char hexChar(int v) {
|
||||||
v = v & 0xF;
|
v = v & 0xF;
|
||||||
if (v < 10)
|
if (v < 10)
|
||||||
return (char)('0' + v);
|
return (char)('0' + v);
|
||||||
return 'A' - 10 + v;
|
return 'A' - 10 + v;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// todo: make this a macro?
|
// todo: make this a macro?
|
||||||
int isIsrContext(void) {
|
int isIsrContext(void) {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
#define isRunningBenchTest() true
|
#define isRunningBenchTest() true
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
static Logging logger;
|
static Logging logger;
|
||||||
#endif
|
|
||||||
|
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
|
@ -54,17 +52,13 @@ void Engine::precalc(engine_configuration_s *engineConfiguration) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::init() {
|
void Engine::init() {
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
initLogging(&logger, "engine");
|
initLogging(&logger, "engine");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool stopPin(io_pin_e pin) {
|
static bool stopPin(io_pin_e pin) {
|
||||||
if (getOutputPinValue(pin)) {
|
if (getOutputPinValue(pin)) {
|
||||||
setOutputPinValue(pin, 0);
|
setOutputPinValue(pin, 0);
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
scheduleMsg(&logger, "turning off %s", getPinName(pin));
|
scheduleMsg(&logger, "turning off %s", getPinName(pin));
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -120,15 +114,10 @@ void StartupFuelPumping::setPumpsCounter(engine_configuration_s *engineConfigura
|
||||||
pumpsCounter = newValue;
|
pumpsCounter = newValue;
|
||||||
|
|
||||||
if (pumpsCounter == PUMPS_TO_PRIME) {
|
if (pumpsCounter == PUMPS_TO_PRIME) {
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
scheduleMsg(&logger, "let's squirt prime pulse %f", pumpsCounter);
|
scheduleMsg(&logger, "let's squirt prime pulse %f", pumpsCounter);
|
||||||
#endif
|
|
||||||
pumpsCounter = 0;
|
pumpsCounter = 0;
|
||||||
} else {
|
} else {
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
scheduleMsg(&logger, "setPumpsCounter %d", pumpsCounter);
|
scheduleMsg(&logger, "setPumpsCounter %d", pumpsCounter);
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,17 +39,13 @@ EXTERN_ENGINE;
|
||||||
extern WaveChart waveChart;
|
extern WaveChart waveChart;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
static Logging logger;
|
static Logging logger;
|
||||||
#endif
|
|
||||||
|
|
||||||
extern OutputPin outputs[IO_PIN_COUNT];
|
extern OutputPin outputs[IO_PIN_COUNT];
|
||||||
extern pin_output_mode_e *pinDefaultState[IO_PIN_COUNT];
|
extern pin_output_mode_e *pinDefaultState[IO_PIN_COUNT];
|
||||||
|
|
||||||
void initSignalExecutor(void) {
|
void initSignalExecutor(void) {
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
initLogging(&logger, "s exec");
|
initLogging(&logger, "s exec");
|
||||||
#endif
|
|
||||||
initSignalExecutorImpl();
|
initSignalExecutorImpl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,9 @@ extern WaveChart waveChart;
|
||||||
|
|
||||||
#define TOP_DEAD_CENTER_MESSAGE "r"
|
#define TOP_DEAD_CENTER_MESSAGE "r"
|
||||||
|
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE;
|
||||||
;
|
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
static Logging logger;
|
static Logging logger;
|
||||||
EXTERN_ENGINE
|
|
||||||
;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RpmCalculator::RpmCalculator() {
|
RpmCalculator::RpmCalculator() {
|
||||||
#if !EFI_PROD_CODE
|
#if !EFI_PROD_CODE
|
||||||
|
|
|
@ -330,9 +330,9 @@
|
||||||
<state>$PROJ_DIR$\..\config\stm32f4ems</state>
|
<state>$PROJ_DIR$\..\config\stm32f4ems</state>
|
||||||
<state>$PROJ_DIR$\..\console\tunerstudio</state>
|
<state>$PROJ_DIR$\..\console\tunerstudio</state>
|
||||||
<state>$PROJ_DIR$\..\console_util</state>
|
<state>$PROJ_DIR$\..\console_util</state>
|
||||||
<state>$PROJ_DIR$\..\emulation</state>
|
<state>$PROJ_DIR$\..\development</state>
|
||||||
<state>$PROJ_DIR$\..\emulation\test</state>
|
<state>$PROJ_DIR$\..\development\test</state>
|
||||||
<state>$PROJ_DIR$\..\emulation\hw_layer</state>
|
<state>$PROJ_DIR$\..\development\hw_layer</state>
|
||||||
<state>$PROJ_DIR$\..\hw_layer\algo</state>
|
<state>$PROJ_DIR$\..\hw_layer\algo</state>
|
||||||
<state>$PROJ_DIR$\..\hw_layer\lcd</state>
|
<state>$PROJ_DIR$\..\hw_layer\lcd</state>
|
||||||
<state>$PROJ_DIR$\..\hw_layer\stm32f4</state>
|
<state>$PROJ_DIR$\..\hw_layer\stm32f4</state>
|
||||||
|
@ -340,8 +340,8 @@
|
||||||
<state>$PROJ_DIR$\..\hw_layer</state>
|
<state>$PROJ_DIR$\..\hw_layer</state>
|
||||||
<state>$PROJ_DIR$\..\ext</state>
|
<state>$PROJ_DIR$\..\ext</state>
|
||||||
<state>$PROJ_DIR$\..\ext_algo</state>
|
<state>$PROJ_DIR$\..\ext_algo</state>
|
||||||
<state>$PROJ_DIR$\..\emulation</state>
|
<state>$PROJ_DIR$\..\development</state>
|
||||||
<state>$PROJ_DIR$\..\emulation\hw_layer</state>
|
<state>$PROJ_DIR$\..\development\hw_layer</state>
|
||||||
<state>$PROJ_DIR$\..\util</state>
|
<state>$PROJ_DIR$\..\util</state>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
|
@ -2195,12 +2195,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\controllers\algo\obd_error_codes.h</name>
|
<name>$PROJ_DIR$\..\controllers\algo\obd_error_codes.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\controllers\algo\OutputSignalArray.cpp</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\controllers\algo\OutputSignalList.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\controllers\algo\rusefi_enums.h</name>
|
<name>$PROJ_DIR$\..\controllers\algo\rusefi_enums.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2210,17 +2204,11 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\controllers\algo\signal_executor.h</name>
|
<name>$PROJ_DIR$\..\controllers\algo\signal_executor.h</name>
|
||||||
</file>
|
</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>
|
||||||
<group>
|
<group>
|
||||||
<name>core</name>
|
<name>core</name>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\controllers\core\avg_values.c</name>
|
<name>$PROJ_DIR$\..\controllers\core\avg_values.cpp</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\controllers\core\avg_values.h</name>
|
<name>$PROJ_DIR$\..\controllers\core\avg_values.h</name>
|
||||||
|
@ -2510,60 +2498,66 @@
|
||||||
</file>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<name>emulation</name>
|
<name>development</name>
|
||||||
<group>
|
<group>
|
||||||
<name>hw_layer</name>
|
<name>hw_layer</name>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\hw_layer\poten.c</name>
|
<name>$PROJ_DIR$\..\development\hw_layer\poten.c</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\hw_layer\poten.h</name>
|
<name>$PROJ_DIR$\..\development\hw_layer\poten.h</name>
|
||||||
</file>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<name>test</name>
|
<name>test</name>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\test\test.c</name>
|
<name>$PROJ_DIR$\..\development\test\test.c</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\test\test.h</name>
|
<name>$PROJ_DIR$\..\development\test\test.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\test\testbmk.c</name>
|
<name>$PROJ_DIR$\..\development\test\testbmk.c</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\test\testbmk.h</name>
|
<name>$PROJ_DIR$\..\development\test\testbmk.h</name>
|
||||||
</file>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\analog_chart.cpp</name>
|
<name>$PROJ_DIR$\..\development\analog_chart.cpp</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\analog_chart.h</name>
|
<name>$PROJ_DIR$\..\development\analog_chart.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\engine_emulator.cpp</name>
|
<name>$PROJ_DIR$\..\development\engine_emulator.cpp</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\engine_emulator.h</name>
|
<name>$PROJ_DIR$\..\development\engine_emulator.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\rfi_perftest.cpp</name>
|
<name>$PROJ_DIR$\..\development\rfi_perftest.cpp</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\rfi_perftest.h</name>
|
<name>$PROJ_DIR$\..\development\rfi_perftest.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\trigger_emulator.cpp</name>
|
<name>$PROJ_DIR$\..\development\trigger_emulator.cpp</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\trigger_emulator.h</name>
|
<name>$PROJ_DIR$\..\development\trigger_emulator.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\emulation\wave_analyzer.cpp</name>
|
<name>$PROJ_DIR$\..\development\wave_analyzer.cpp</name>
|
||||||
</file>
|
</file>
|
||||||
<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>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
|
|
|
@ -32,11 +32,11 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "rfiutil.h"
|
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "chmtx.h"
|
#include "chmtx.h"
|
||||||
#include "memstreams.h"
|
#include "memstreams.h"
|
||||||
#include "console_io.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
|
// we use this magic constant to make sure it's not just a random non-zero int in memory
|
||||||
#define MAGIC_LOGGING_FLAG 45234441
|
#define MAGIC_LOGGING_FLAG 45234441
|
|
@ -1,8 +1,11 @@
|
||||||
|
|
||||||
UTILSRC = $(PROJECT_DIR)/util/data_buffer.c \
|
UTIL_TEST_SRC = $(PROJECT_DIR)/util/crc.c \
|
||||||
$(PROJECT_DIR)/util/crc.c \
|
$(PROJECT_DIR)/util/data_buffer.c \
|
||||||
$(PROJECT_DIR)/util/histogram.c \
|
$(PROJECT_DIR)/util/histogram.c \
|
||||||
$(PROJECT_DIR)/util/cli_registry.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 \
|
UTILSRC_CPP = $(PROJECT_DIR)/util/cyclic_buffer.cpp \
|
||||||
$(PROJECT_DIR)/util/listener_array.cpp \
|
$(PROJECT_DIR)/util/listener_array.cpp \
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<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>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<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>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
|
|
|
@ -84,7 +84,7 @@ include test.mk
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
CSRC = $(UTILSRC) \
|
CSRC = $(UTIL_TEST_SRC) \
|
||||||
$(CONTROLLERS_ALGO_SRC) \
|
$(CONTROLLERS_ALGO_SRC) \
|
||||||
$(CONTROLLERS_CORE_SRC) \
|
$(CONTROLLERS_CORE_SRC) \
|
||||||
$(CONTROLLERS_MATH_SRC) \
|
$(CONTROLLERS_MATH_SRC) \
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
typedef int bool_t;
|
typedef int bool_t;
|
||||||
|
|
||||||
typedef void * Logging;
|
|
||||||
|
|
||||||
#define EFI_ERROR_CODE 0xffffffff
|
#define EFI_ERROR_CODE 0xffffffff
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
|
|
|
@ -176,3 +176,9 @@ int warning(const char *fmt, ...) {
|
||||||
bool isCranking(void) {
|
bool isCranking(void) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void initLogging(Logging *logging, const char *name) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void scheduleMsg(Logging *logging, const char *fmt, ...) {
|
||||||
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "error_handling.h"
|
#include "error_handling.h"
|
||||||
#include "efifeatures.h"
|
#include "efifeatures.h"
|
||||||
|
#include "datalogging.h"
|
||||||
|
|
||||||
#include "efilib.h"
|
#include "efilib.h"
|
||||||
#include "efitime.h"
|
#include "efitime.h"
|
||||||
|
|
Loading…
Reference in New Issue