auto-sync
This commit is contained in:
parent
584ee5d2f8
commit
f6d0ce3274
|
@ -208,6 +208,12 @@ static void setMiata1994_common(engine_configuration_s *engineConfiguration, boa
|
||||||
commonMiataNa(engineConfiguration, boardConfiguration);
|
commonMiataNa(engineConfiguration, boardConfiguration);
|
||||||
engineConfiguration->displacement = 1.839;
|
engineConfiguration->displacement = 1.839;
|
||||||
|
|
||||||
|
// set_cranking_timing_angle 0
|
||||||
|
engineConfiguration->crankingTimingAngle = 0;
|
||||||
|
|
||||||
|
engineConfiguration->crankingChargeAngle = 70;
|
||||||
|
|
||||||
|
|
||||||
// todo: extract an array16x16 type? extract a method?
|
// todo: extract an array16x16 type? extract a method?
|
||||||
for (int k = 0; k < FUEL_LOAD_COUNT; k++) {
|
for (int k = 0; k < FUEL_LOAD_COUNT; k++) {
|
||||||
for (int r = 0; r < FUEL_RPM_COUNT; r++) {
|
for (int r = 0; r < FUEL_RPM_COUNT; r++) {
|
||||||
|
|
|
@ -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) {
|
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
|
return; // this might happen for instance in case of a single trigger event after a pause
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,8 +34,6 @@ extern WaveChart waveChart;
|
||||||
#include "analog_chart.h"
|
#include "analog_chart.h"
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
#define UNREALISTIC_RPM 30000
|
|
||||||
|
|
||||||
#define TOP_DEAD_CENTER_MESSAGE "r"
|
#define TOP_DEAD_CENTER_MESSAGE "r"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,10 +110,6 @@ int RpmCalculator::rpm(void) {
|
||||||
return rpmValue;
|
return rpmValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isValidRpm(int rpm) {
|
|
||||||
return rpm > 0 && rpm < UNREALISTIC_RPM;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
||||||
bool isCrankingE(Engine *engine) {
|
bool isCrankingE(Engine *engine) {
|
||||||
int rpm = getRpmE(engine);
|
int rpm = getRpmE(engine);
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#define WC_CRANK3 "c3"
|
#define WC_CRANK3 "c3"
|
||||||
|
|
||||||
#define NOISY_RPM -1
|
#define NOISY_RPM -1
|
||||||
|
#define UNREALISTIC_RPM 30000
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
@ -76,7 +77,8 @@ extern "C" {
|
||||||
bool isCranking(void);
|
bool isCranking(void);
|
||||||
|
|
||||||
int getRevolutionCounter(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);
|
void addWaveChartEvent(const char *name, const char *msg, const char *msg2);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -78,7 +78,7 @@ int TriggerCentral::getHwEventCounter(int index) {
|
||||||
|
|
||||||
static char shaft_signal_msg_index[15];
|
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);
|
itoa10(&shaft_signal_msg_index[1], index);
|
||||||
if (ckpSignalType == SHAFT_PRIMARY_UP) {
|
if (ckpSignalType == SHAFT_PRIMARY_UP) {
|
||||||
addWaveChartEvent(WC_CRANK1, WC_UP, (char*) shaft_signal_msg_index);
|
addWaveChartEvent(WC_CRANK1, WC_UP, (char*) shaft_signal_msg_index);
|
||||||
|
|
Loading…
Reference in New Issue