mirror of https://github.com/FOME-Tech/fome-fw.git
auto-sync
This commit is contained in:
parent
710cbd5718
commit
da4f8aaade
|
@ -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
|
||||||
|
|
|
@ -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,9 +1,12 @@
|
||||||
|
|
||||||
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 \
|
||||||
$(PROJECT_DIR)/util/efilib.cpp \
|
$(PROJECT_DIR)/util/efilib.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