auto-sync

This commit is contained in:
rusEfi 2015-07-15 21:01:45 -04:00
parent c6f405f4e1
commit 4d6351591c
16 changed files with 45 additions and 45 deletions

View File

@ -140,7 +140,7 @@
#define EFI_SUPPORT_NISSAN_PRIMERA TRUE
#define EFI_SUPPORT_1995_FORD_INLINE_6 TRUE
#define EFI_WAVE_CHART TRUE
#define EFI_ENGINE_SNIFFER TRUE
#define EFI_HISTOGRAMS FALSE
#define EFI_ANALOG_CHART TRUE

View File

@ -34,8 +34,8 @@
EXTERN_ENGINE;
#if EFI_WAVE_CHART
#include "wave_chart.h"
#if EFI_ENGINE_SNIFFER
#include "engine_sniffer.h"
extern WaveChart waveChart;
#endif
@ -74,7 +74,7 @@ void turnPinHigh(NamedOutputPin *output) {
doSetOutputPinValue2(output, true);
// sleep for the needed duration
#endif
#if EFI_WAVE_CHART
#if EFI_ENGINE_SNIFFER
// explicit check here is a performance optimization to speed up no-chart mode
if (CONFIG(isEngineChartEnabled)) {
// this is a performance optimization - array index is cheaper then invoking a method with 'switch'
@ -100,7 +100,7 @@ void turnPinLow(NamedOutputPin *output) {
scheduleLogging(&signal->logging);
#endif /* EFI_DEFAILED_LOGGING */
#if EFI_WAVE_CHART
#if EFI_ENGINE_SNIFFER
if (CONFIG(isEngineChartEnabled)) {
// this is a performance optimization - array index is cheaper then invoking a method with 'switch'
const char *pinName = output->name;

View File

@ -35,11 +35,11 @@
#include "flash_main.h"
#endif /* EFI_INTERNAL_FLASH */
#if EFI_WAVE_CHART || defined(__DOXYGEN__)
#include "wave_chart.h"
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
#include "engine_sniffer.h"
extern int waveChartUsedSize;
extern WaveChart waveChart;
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
static char LOGGING_BUFFER[1000];
static Logging logger("settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
@ -303,7 +303,7 @@ static void setTimingMode(int value) {
void setEngineType(int value) {
engineConfiguration->engineType = (engine_type_e) value;
resetConfigurationExt(&logger, (engine_type_e) value PASS_ENGINE_PARAMETER);
#if EFI_WAVE_CHART || defined(__DOXYGEN__)
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
if (engine->isTestMode)
waveChart.resetWaveChart();
#endif
@ -910,7 +910,7 @@ void stopEngine(void) {
static void printAllInfo(void) {
printTemperatureInfo();
printTPSInfo();
#if EFI_WAVE_CHART
#if EFI_ENGINE_SNIFFER
scheduleMsg(&logger, "waveChartUsedSize=%d", waveChartUsedSize);
#endif
#if EFI_PROD_CODE

View File

@ -425,14 +425,14 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECL
}
}
#if EFI_WAVE_CHART || defined(__DOXYGEN__)
#include "wave_chart.h"
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
#include "engine_sniffer.h"
#endif
static void showTriggerHistogram(void) {
printAllCallbacksHistogram();
showMainHistogram();
#if EFI_WAVE_CHART || defined(__DOXYGEN__)
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
showWaveChartHistogram();
#endif
}

View File

@ -30,10 +30,10 @@
#include "efilib2.h"
#if EFI_WAVE_CHART
#include "wave_chart.h"
#if EFI_ENGINE_SNIFFER
#include "engine_sniffer.h"
extern WaveChart waveChart;
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
EXTERN_ENGINE
;

View File

@ -97,11 +97,11 @@ bool isCranking(void);
#define isValidRpm(rpm) ((rpm) > 0 && (rpm) < UNREALISTIC_RPM)
#if EFI_WAVE_CHART
#if EFI_ENGINE_SNIFFER
#define addWaveChartEvent(name, msg) waveChart.addWaveChartEvent3((name), (msg))
#else
#define addWaveChartEvent(n, msg) {}
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle, schfunc_t callback, void *param, RpmCalculator *calc);

View File

@ -27,10 +27,10 @@
#include "pin_repository.h"
#endif
#if EFI_WAVE_CHART
#include "wave_chart.h"
#if EFI_ENGINE_SNIFFER
#include "engine_sniffer.h"
WaveChart waveChart;
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
static histogram_s triggerCallback;
@ -392,9 +392,9 @@ void initTriggerCentral(Logging *sharedLogger, Engine *engine) {
logger = sharedLogger;
strcpy((char*) shaft_signal_msg_index, "x_");
#if EFI_WAVE_CHART
#if EFI_ENGINE_SNIFFER
initWaveChart(&waveChart);
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
#if EFI_PROD_CODE || EFI_SIMULATOR
addConsoleAction("triggerinfo", triggerInfo);

View File

@ -87,10 +87,10 @@ static bool isEmulating = true;
static Logging *logger;
static LocalVersionHolder emulatorConfigVersion;
#if EFI_WAVE_CHART
#include "wave_chart.h"
#if EFI_ENGINE_SNIFFER
#include "engine_sniffer.h"
extern WaveChart waveChart;
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
void setTriggerEmulatorRPM(int rpm, Engine *engine) {
engineConfiguration->bc.triggerSimulatorFrequency = rpm;
@ -105,10 +105,10 @@ void setTriggerEmulatorRPM(int rpm, Engine *engine) {
float gRpm = rpm * rpmM / 60.0; // per minute converted to per second
triggerSignal.periodNt = US2NT(frequency2periodUs(gRpm));
}
#if EFI_WAVE_CHART
#if EFI_ENGINE_SNIFFER
if (engine->isTestMode)
waveChart.resetWaveChart();
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
scheduleMsg(logger, "Emulating position sensor(s). RPM=%d", rpm);
}

View File

@ -7,7 +7,7 @@ DEV_SRC_CPP = development/trigger_emulator.cpp \
development/sensor_chart.cpp \
development/rfi_perftest.cpp \
development/engine_emulator.cpp \
$(PROJECT_DIR)/development/wave_chart.cpp \
$(PROJECT_DIR)/development/engine_sniffer.cpp \
development/wave_analyzer.cpp
DEV_SIMULATOR_SRC_CPP = $(PROJECT_DIR)/development/wave_chart.cpp
DEV_SIMULATOR_SRC_CPP = $(PROJECT_DIR)/development/engine_sniffer.cpp

View File

@ -1,5 +1,5 @@
/**
* @file wave_chart.cpp
* @file engine_sniffer.cpp
* @brief Dev console wave sniffer logic
*
* Here we have our own build-in logic analyzer. The data we aggregate here is sent to the
@ -25,9 +25,9 @@
*/
#include "main.h"
#include "wave_chart.h"
#include "engine_sniffer.h"
#if EFI_WAVE_CHART || defined(__DOXYGEN__)
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
#include "engine_configuration.h"
#include "eficonsole.h"
@ -268,4 +268,4 @@ void initWaveChart(WaveChart *chart) {
#endif
}
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */

View File

@ -1,5 +1,5 @@
/**
* @file wave_chart.h
* @file engine_sniffer.h
* @brief Dev console wave sniffer
*
* @date Jun 23, 2013
@ -11,7 +11,7 @@
#include "global.h"
#if EFI_WAVE_CHART || defined(__DOXYGEN__)
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
#include "datalogging.h"
/**
@ -38,6 +38,6 @@ void initWaveChart(WaveChart *chart);
void showWaveChartHistogram(void);
void setChartSize(int newSize);
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
#endif /* WAVE_CHART_H_ */

View File

@ -285,7 +285,7 @@ static void runChibioTest(void) {
print("EFI_HD44780_LCD=%d\r\n", EFI_HD44780_LCD);
print("EFI_MAP_AVERAGING=%d\r\n", EFI_MAP_AVERAGING);
print("EFI_WAVE_ANALYZER=%d\r\n", EFI_WAVE_ANALYZER);
print("EFI_WAVE_CHART=%d\r\n", EFI_WAVE_CHART);
print("EFI_ENGINE_SNIFFER=%d\r\n", EFI_ENGINE_SNIFFER);
print("EFI_ANALOG_CHART=%d\r\n", EFI_ANALOG_CHART);
print("EFI_SHAFT_POSITION_INPUT=%d\r\n", EFI_SHAFT_POSITION_INPUT);
print("EFI_ENGINE_CONTROL=%d\r\n", EFI_ENGINE_CONTROL);

View File

@ -23,7 +23,7 @@
#include "engine_math.h"
#include "engine.h"
#include "rpm_calculator.h"
#include "wave_chart.h"
#include "engine_sniffer.h"
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
@ -32,7 +32,7 @@ EXTERN_ENGINE;
#define CHART_RESET_DELAY 1
#define MAX_ICU_COUNT 5
#if EFI_WAVE_CHART || defined(__DOXYGEN__)
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
extern WaveChart waveChart;
#endif
extern bool hasFirmwareErrorFlag;
@ -154,13 +154,13 @@ static void waTriggerEventListener(trigger_event_e ckpSignalType, uint32_t index
static msg_t waThread(void *arg) {
(void)arg;
chRegSetThreadName("Wave Analyzer");
#if EFI_WAVE_CHART
#if EFI_ENGINE_SNIFFER
while (TRUE) {
chThdSleepSeconds(CHART_RESET_DELAY);
waveChart.publishChartIfFull();
}
#endif /* EFI_WAVE_CHART */
#endif /* EFI_ENGINE_SNIFFER */
#if defined __GNUC__
return -1;
#endif

View File

@ -16,7 +16,7 @@
#include "datalogging.h"
#include "digital_input_hw.h"
#include "wave_chart.h"
#include "engine_sniffer.h"
#define WA_CHANNEL_1 "input1"
#define WA_CHANNEL_2 "input2"

View File

@ -38,7 +38,7 @@
#define EFI_ENGINE_CONTROL TRUE
#define EFI_WAVE_CHART TRUE
#define EFI_ENGINE_SNIFFER TRUE
#define EFI_ANALOG_SENSORS TRUE

View File

@ -17,7 +17,7 @@
#include "datalogging.h"
#include "algo.h"
#include "rpm_calculator.h"
#include "wave_chart.h"
#include "engine_sniffer.h"
#include "status_loop.h"
#include "trigger_emulator_algo.h"
#include "main_trigger_callback.h"