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
|
||||
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 */
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
|
||||
CONSOLEUTILSRC = $(PROJECT_DIR)/console_util/datalogging.c \
|
||||
$(PROJECT_DIR)/console_util/rfiutil.c
|
||||
CONSOLEUTILSRC = $(PROJECT_DIR)/console_util/rfiutil.c
|
|
@ -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) {
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -1,9 +1,12 @@
|
|||
|
||||
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 \
|
||||
$(PROJECT_DIR)/util/efilib.cpp \
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
typedef int bool_t;
|
||||
|
||||
typedef void * Logging;
|
||||
|
||||
#define EFI_ERROR_CODE 0xffffffff
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
|
|
@ -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, ...) {
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "global.h"
|
||||
#include "error_handling.h"
|
||||
#include "efifeatures.h"
|
||||
#include "datalogging.h"
|
||||
|
||||
#include "efilib.h"
|
||||
#include "efitime.h"
|
||||
|
|
Loading…
Reference in New Issue