auto-sync
This commit is contained in:
parent
c9852aa7b5
commit
6a304142ef
|
@ -143,7 +143,7 @@
|
||||||
#define EFI_ENGINE_SNIFFER TRUE
|
#define EFI_ENGINE_SNIFFER TRUE
|
||||||
|
|
||||||
#define EFI_HISTOGRAMS FALSE
|
#define EFI_HISTOGRAMS FALSE
|
||||||
#define EFI_ANALOG_CHART TRUE
|
#define EFI_SENSOR_CHART TRUE
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
#define EFI_PERF_METRICS FALSE
|
#define EFI_PERF_METRICS FALSE
|
||||||
|
|
|
@ -506,9 +506,9 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
||||||
initPwmGenerator();
|
initPwmGenerator();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
initSensorChart();
|
initSensorChart();
|
||||||
#endif /* EFI_ANALOG_CHART */
|
#endif /* EFI_SENSOR_CHART */
|
||||||
|
|
||||||
initAlgo(sharedLogger, engineConfiguration);
|
initAlgo(sharedLogger, engineConfiguration);
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
#include "sensor_chart.h"
|
#include "sensor_chart.h"
|
||||||
#endif /* EFI_ANALOG_CHART */
|
#endif /* EFI_SENSOR_CHART */
|
||||||
|
|
||||||
#define FAST_MAP_CHART_SKIP_FACTOR 16
|
#define FAST_MAP_CHART_SKIP_FACTOR 16
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ void mapAveragingCallback(adcsample_t adcValue) {
|
||||||
measurementsPerRevolutionCounter++;
|
measurementsPerRevolutionCounter++;
|
||||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#9a");
|
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#9a");
|
||||||
|
|
||||||
#if (EFI_ANALOG_CHART && EFI_ANALOG_SENSORS) || defined(__DOXYGEN__)
|
#if (EFI_SENSOR_CHART && EFI_ANALOG_SENSORS) || defined(__DOXYGEN__)
|
||||||
if (boardConfiguration->sensorChartMode == SC_MAP) {
|
if (boardConfiguration->sensorChartMode == SC_MAP) {
|
||||||
if (measurementsPerRevolutionCounter % FAST_MAP_CHART_SKIP_FACTOR
|
if (measurementsPerRevolutionCounter % FAST_MAP_CHART_SKIP_FACTOR
|
||||||
== 0) {
|
== 0) {
|
||||||
|
@ -127,7 +127,7 @@ void mapAveragingCallback(adcsample_t adcValue) {
|
||||||
currentPressure);
|
currentPressure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* EFI_ANALOG_CHART */
|
#endif /* EFI_SENSOR_CHART */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local copy is now safe, but it's an overkill: we only
|
* Local copy is now safe, but it's an overkill: we only
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
#include "sensor_chart.h"
|
#include "sensor_chart.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
|
||||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#2z");
|
efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#2z");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
angle_t crankAngle = NAN;
|
angle_t crankAngle = NAN;
|
||||||
int signal = -1;
|
int signal = -1;
|
||||||
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
|
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
|
||||||
|
@ -174,7 +174,7 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
|
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
|
||||||
scAddData(crankAngle, signal);
|
scAddData(crankAngle, signal);
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
|
||||||
}
|
}
|
||||||
rpmState->onNewEngineCycle();
|
rpmState->onNewEngineCycle();
|
||||||
rpmState->lastRpmEventTimeNt = nowNt;
|
rpmState->lastRpmEventTimeNt = nowNt;
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
|
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
|
||||||
scAddData(crankAngle, signal);
|
scAddData(crankAngle, signal);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
#include "sensor_chart.h"
|
#include "sensor_chart.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
||||||
prevSignal = curSignal;
|
prevSignal = curSignal;
|
||||||
curSignal = signal;
|
curSignal = signal;
|
||||||
|
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
if (boardConfiguration->sensorChartMode == SC_RPM_ACCEL) {
|
if (boardConfiguration->sensorChartMode == SC_RPM_ACCEL) {
|
||||||
angle_t currentAngle = TRIGGER_SHAPE(eventAngles[currentCycle.current_index]);
|
angle_t currentAngle = TRIGGER_SHAPE(eventAngles[currentCycle.current_index]);
|
||||||
// todo: make this '90' depend on cylinder count?
|
// todo: make this '90' depend on cylinder count?
|
||||||
|
|
|
@ -286,7 +286,7 @@ static void runChibioTest(void) {
|
||||||
print("EFI_MAP_AVERAGING=%d\r\n", EFI_MAP_AVERAGING);
|
print("EFI_MAP_AVERAGING=%d\r\n", EFI_MAP_AVERAGING);
|
||||||
print("EFI_WAVE_ANALYZER=%d\r\n", EFI_WAVE_ANALYZER);
|
print("EFI_WAVE_ANALYZER=%d\r\n", EFI_WAVE_ANALYZER);
|
||||||
print("EFI_ENGINE_SNIFFER=%d\r\n", EFI_ENGINE_SNIFFER);
|
print("EFI_ENGINE_SNIFFER=%d\r\n", EFI_ENGINE_SNIFFER);
|
||||||
print("EFI_ANALOG_CHART=%d\r\n", EFI_ANALOG_CHART);
|
print("EFI_SENSOR_CHART=%d\r\n", EFI_SENSOR_CHART);
|
||||||
print("EFI_SHAFT_POSITION_INPUT=%d\r\n", EFI_SHAFT_POSITION_INPUT);
|
print("EFI_SHAFT_POSITION_INPUT=%d\r\n", EFI_SHAFT_POSITION_INPUT);
|
||||||
print("EFI_ENGINE_CONTROL=%d\r\n", EFI_ENGINE_CONTROL);
|
print("EFI_ENGINE_CONTROL=%d\r\n", EFI_ENGINE_CONTROL);
|
||||||
print("CH_DBG_SYSTEM_STATE_CHECK=%d\r\n", CH_DBG_SYSTEM_STATE_CHECK);
|
print("CH_DBG_SYSTEM_STATE_CHECK=%d\r\n", CH_DBG_SYSTEM_STATE_CHECK);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "rpm_calculator.h"
|
#include "rpm_calculator.h"
|
||||||
#include "status_loop.h"
|
#include "status_loop.h"
|
||||||
|
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
|
|
||||||
static char LOGGING_BUFFER[5000];
|
static char LOGGING_BUFFER[5000];
|
||||||
static Logging logging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
static Logging logging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
||||||
|
@ -76,4 +76,4 @@ void initSensorChart(void) {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* EFI_ANALOG_CHART */
|
#endif /* EFI_SENSOR_CHART */
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
#include "rfiutil.h"
|
#include "rfiutil.h"
|
||||||
#include "loggingcentral.h"
|
#include "loggingcentral.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
|
|
||||||
|
|
||||||
static MemoryStream intermediateLoggingBuffer;
|
static MemoryStream intermediateLoggingBuffer;
|
||||||
static uint8_t intermediateLoggingBufferData[INTERMEDIATE_LOGGING_BUFFER_SIZE] CCM_OPTIONAL;
|
static uint8_t intermediateLoggingBufferData[INTERMEDIATE_LOGGING_BUFFER_SIZE] CCM_OPTIONAL;
|
||||||
//todo define max-printf-buffer
|
//todo define max-printf-buffer
|
||||||
|
@ -142,11 +139,11 @@ void initLoggingExt(Logging *logging, const char *name, char *buffer, int buffer
|
||||||
logging->buffer = buffer;
|
logging->buffer = buffer;
|
||||||
logging->bufferSize = bufferSize;
|
logging->bufferSize = bufferSize;
|
||||||
resetLogging(logging);
|
resetLogging(logging);
|
||||||
logging->isInitialized = MAGIC_LOGGING_FLAG;
|
logging->isInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int isInitialized(Logging *logging) {
|
int isInitialized(Logging *logging) {
|
||||||
return logging->isInitialized == MAGIC_LOGGING_FLAG;
|
return logging->isInitialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
void debugInt(Logging *logging, const char *caption, int value) {
|
void debugInt(Logging *logging, const char *caption, int value) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ public:
|
||||||
*/
|
*/
|
||||||
char *linePointer;
|
char *linePointer;
|
||||||
int bufferSize;
|
int bufferSize;
|
||||||
volatile int isInitialized;
|
volatile bool_t isInitialized;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LoggingWithStorage : public Logging {
|
class LoggingWithStorage : public Logging {
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
#define EFI_ANALOG_SENSORS TRUE
|
#define EFI_ANALOG_SENSORS TRUE
|
||||||
|
|
||||||
#define EFI_ANALOG_CHART TRUE
|
#define EFI_SENSOR_CHART TRUE
|
||||||
#define EFI_HISTOGRAMS TRUE
|
#define EFI_HISTOGRAMS TRUE
|
||||||
|
|
||||||
#define EFI_TUNER_STUDIO TRUE
|
#define EFI_TUNER_STUDIO TRUE
|
||||||
|
|
|
@ -92,9 +92,9 @@ void rusEfiFunctionalTest(void) {
|
||||||
|
|
||||||
initRpmCalculator(&sharedLogger, engine);
|
initRpmCalculator(&sharedLogger, engine);
|
||||||
|
|
||||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
|
||||||
initSensorChart();
|
initSensorChart();
|
||||||
#endif /* EFI_ANALOG_CHART */
|
#endif /* EFI_SENSOR_CHART */
|
||||||
|
|
||||||
initTriggerCentral(&sharedLogger, engine);
|
initTriggerCentral(&sharedLogger, engine);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue