auto-sync

This commit is contained in:
rusEfi 2015-09-13 12:01:42 -04:00
parent 2913857977
commit dad329927a
9 changed files with 19 additions and 22 deletions

View File

@ -143,7 +143,7 @@
#define EFI_ENGINE_SNIFFER TRUE
#define EFI_HISTOGRAMS FALSE
#define EFI_ANALOG_CHART TRUE
#define EFI_SENSOR_CHART TRUE
#if defined __GNUC__
#define EFI_PERF_METRICS FALSE

View File

@ -506,9 +506,9 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
initPwmGenerator();
#endif
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
initSensorChart();
#endif /* EFI_ANALOG_CHART */
#endif /* EFI_SENSOR_CHART */
initAlgo(sharedLogger, engineConfiguration);

View File

@ -34,9 +34,9 @@
#include "engine.h"
#include "engine_math.h"
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
#include "sensor_chart.h"
#endif /* EFI_ANALOG_CHART */
#endif /* EFI_SENSOR_CHART */
#define FAST_MAP_CHART_SKIP_FACTOR 16
@ -116,7 +116,7 @@ void mapAveragingCallback(adcsample_t adcValue) {
measurementsPerRevolutionCounter++;
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 (measurementsPerRevolutionCounter % FAST_MAP_CHART_SKIP_FACTOR
== 0) {
@ -127,7 +127,7 @@ void mapAveragingCallback(adcsample_t adcValue) {
currentPressure);
}
}
#endif /* EFI_ANALOG_CHART */
#endif /* EFI_SENSOR_CHART */
/**
* Local copy is now safe, but it's an overkill: we only

View File

@ -24,7 +24,7 @@
#include "engine.h"
#endif
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
#include "sensor_chart.h"
#endif
@ -164,7 +164,7 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#2z");
#endif
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
angle_t crankAngle = NAN;
int signal = -1;
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
@ -174,7 +174,7 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
#endif
if (index != 0) {
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
scAddData(crankAngle, signal);
}
@ -203,7 +203,7 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
}
rpmState->onNewEngineCycle();
rpmState->lastRpmEventTimeNt = nowNt;
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
scAddData(crankAngle, signal);
}

View File

@ -37,7 +37,7 @@
#include "engine.h"
#include "engine_math.h"
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
#include "sensor_chart.h"
#endif
@ -126,7 +126,7 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
prevSignal = curSignal;
curSignal = signal;
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
if (boardConfiguration->sensorChartMode == SC_RPM_ACCEL) {
angle_t currentAngle = TRIGGER_SHAPE(eventAngles[currentCycle.current_index]);
// todo: make this '90' depend on cylinder count?

View File

@ -286,7 +286,7 @@ static void runChibioTest(void) {
print("EFI_MAP_AVERAGING=%d\r\n", EFI_MAP_AVERAGING);
print("EFI_WAVE_ANALYZER=%d\r\n", EFI_WAVE_ANALYZER);
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_ENGINE_CONTROL=%d\r\n", EFI_ENGINE_CONTROL);
print("CH_DBG_SYSTEM_STATE_CHECK=%d\r\n", CH_DBG_SYSTEM_STATE_CHECK);

View File

@ -11,7 +11,7 @@
#include "rpm_calculator.h"
#include "status_loop.h"
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
static char LOGGING_BUFFER[5000];
static Logging logging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
@ -76,4 +76,4 @@ void initSensorChart(void) {
initialized = true;
}
#endif /* EFI_ANALOG_CHART */
#endif /* EFI_SENSOR_CHART */

View File

@ -41,9 +41,6 @@
#include "rfiutil.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 uint8_t intermediateLoggingBufferData[INTERMEDIATE_LOGGING_BUFFER_SIZE] CCM_OPTIONAL;
//todo define max-printf-buffer
@ -142,11 +139,11 @@ void initLoggingExt(Logging *logging, const char *name, char *buffer, int buffer
logging->buffer = buffer;
logging->bufferSize = bufferSize;
resetLogging(logging);
logging->isInitialized = MAGIC_LOGGING_FLAG;
logging->isInitialized = true;
}
int isInitialized(Logging *logging) {
return logging->isInitialized == MAGIC_LOGGING_FLAG;
return logging->isInitialized;
}
void debugInt(Logging *logging, const char *caption, int value) {

View File

@ -35,7 +35,7 @@ public:
*/
char *linePointer;
int bufferSize;
volatile int isInitialized;
volatile bool_t isInitialized;
};
class LoggingWithStorage : public Logging {