auto-sync

This commit is contained in:
rusEfi 2014-11-11 22:04:51 -06:00
parent 584ee5d2f8
commit f6d0ce3274
5 changed files with 11 additions and 9 deletions

View File

@ -208,6 +208,12 @@ static void setMiata1994_common(engine_configuration_s *engineConfiguration, boa
commonMiataNa(engineConfiguration, boardConfiguration);
engineConfiguration->displacement = 1.839;
// set_cranking_timing_angle 0
engineConfiguration->crankingTimingAngle = 0;
engineConfiguration->crankingChargeAngle = 70;
// todo: extract an array16x16 type? extract a method?
for (int k = 0; k < FUEL_LOAD_COUNT; k++) {
for (int r = 0; r < FUEL_RPM_COUNT; r++) {

View File

@ -198,7 +198,7 @@ static ALWAYS_INLINE void handleSparkEvent(uint32_t eventIndex, IgnitionEvent *i
}
static ALWAYS_INLINE void handleSpark(uint32_t eventIndex, int rpm, IgnitionEventList *list DECLATE_ENGINE_PARAMETER) {
if (!isValidRpm(rpm) || !engine->engineConfiguration->isIgnitionEnabled)
if (!isValidRpm(rpm) || !engineConfiguration->isIgnitionEnabled)
return; // this might happen for instance in case of a single trigger event after a pause
/**

View File

@ -34,8 +34,6 @@ extern WaveChart waveChart;
#include "analog_chart.h"
#endif /* EFI_PROD_CODE */
#define UNREALISTIC_RPM 30000
#define TOP_DEAD_CENTER_MESSAGE "r"
/**
@ -112,10 +110,6 @@ int RpmCalculator::rpm(void) {
return rpmValue;
}
bool isValidRpm(int rpm) {
return rpm > 0 && rpm < UNREALISTIC_RPM;
}
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
bool isCrankingE(Engine *engine) {
int rpm = getRpmE(engine);

View File

@ -18,6 +18,7 @@
#define WC_CRANK3 "c3"
#define NOISY_RPM -1
#define UNREALISTIC_RPM 30000
#ifdef __cplusplus
@ -76,7 +77,8 @@ extern "C" {
bool isCranking(void);
int getRevolutionCounter(void);
bool isValidRpm(int rpm);
#define isValidRpm(rpm) ((rpm) > 0 && (rpm) < UNREALISTIC_RPM)
void addWaveChartEvent(const char *name, const char *msg, const char *msg2);
#ifdef __cplusplus

View File

@ -78,7 +78,7 @@ int TriggerCentral::getHwEventCounter(int index) {
static char shaft_signal_msg_index[15];
static void reportEventToWaveChart(trigger_event_e ckpSignalType, int index) {
static ALWAYS_INLINE void reportEventToWaveChart(trigger_event_e ckpSignalType, int index) {
itoa10(&shaft_signal_msg_index[1], index);
if (ckpSignalType == SHAFT_PRIMARY_UP) {
addWaveChartEvent(WC_CRANK1, WC_UP, (char*) shaft_signal_msg_index);