auto-sync
This commit is contained in:
parent
f7b95e16e3
commit
76e8b5e879
|
@ -62,7 +62,7 @@ bool isStep1Condition(int rpm DECLARE_ENGINE_PARAMETER_S) {
|
|||
static angle_t getRunningAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S) {
|
||||
engine->m.beforeAdvance = GET_TIMESTAMP();
|
||||
if (cisnan(engineLoad)) {
|
||||
warning(CUSTOM_OBD_0, "NaN engine load");
|
||||
warning(CUSTOM_NAN_ENGINE_LOAD, "NaN engine load");
|
||||
return NAN;
|
||||
}
|
||||
efiAssert(!cisnan(engineLoad), "invalid el", NAN);
|
||||
|
@ -182,7 +182,7 @@ float getInitialAdvance(int rpm, float map, float advanceMax) {
|
|||
void buildTimingMap(float advanceMax DECLARE_ENGINE_PARAMETER_S) {
|
||||
if (engineConfiguration->fuelAlgorithm != LM_SPEED_DENSITY &&
|
||||
engineConfiguration->fuelAlgorithm != LM_MAP) {
|
||||
warning(CUSTOM_OBD_1, "wrong algorithm for MAP-based timing");
|
||||
warning(CUSTOM_WRONG_ALGORITHM, "wrong algorithm for MAP-based timing");
|
||||
return;
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -191,7 +191,7 @@ float getIatCorrection(float iat DECLARE_ENGINE_PARAMETER_S) {
|
|||
*/
|
||||
floatms_t getBaseTableFuel(engine_configuration_s *engineConfiguration, int rpm, float engineLoad) {
|
||||
if (cisnan(engineLoad)) {
|
||||
warning(CUSTOM_OBD_2, "NaN engine load");
|
||||
warning(CUSTOM_NAN_ENGINE_LOAD_2, "NaN engine load");
|
||||
return NAN;
|
||||
}
|
||||
return fuelMap.getValue(rpm, engineLoad);
|
||||
|
|
|
@ -1664,11 +1664,11 @@ typedef enum {
|
|||
//P3492 Cyl12 Deactivation/Intake Valve Ctrl Circ High
|
||||
//P3493 Cyl12 Exhaust Valve Ctrl Circ/Open
|
||||
|
||||
CUSTOM_OBD_0 = 6000,
|
||||
CUSTOM_OBD_1 = 6001,
|
||||
CUSTOM_OBD_2 = 6002,
|
||||
CUSTOM_NAN_ENGINE_LOAD = 6000,
|
||||
CUSTOM_WRONG_ALGORITHM = 6001,
|
||||
CUSTOM_NAN_ENGINE_LOAD_2 = 6002,
|
||||
CUSTOM_OBD_3 = 6003,
|
||||
CUSTOM_OBD_4 = 6004,
|
||||
CUSTOM_NAN_DURACTION = 6004,
|
||||
CUSTOM_OBD_5 = 6005,
|
||||
CUSTOM_OBD_6 = 6006,
|
||||
CUSTOM_NO_FSIO = 6007,
|
||||
|
@ -1713,7 +1713,7 @@ typedef enum {
|
|||
CUSTOM_OBD_42 = 6042,
|
||||
CUSTOM_OBD_MMC_ERROR = 6043,
|
||||
CUSTOM_OBD_44 = 6044,
|
||||
CUSTOM_OBD_45 = 6045,
|
||||
CUSTOM_OBD_SKIPPED_SPARK = 6045,
|
||||
CUSTOM_OBD_SKIPPED_FUEL = 6046,
|
||||
CUSTOM_OBD_SCH_REUSE = 6047,
|
||||
CUSTOM_OBD_48 = 6048,
|
||||
|
@ -1827,7 +1827,7 @@ typedef enum {
|
|||
CUSTOM_ERR_6146 = 6146,
|
||||
CUSTOM_ERR_6147 = 6147,
|
||||
CUSTOM_ERR_6148 = 6148,
|
||||
CUSTOM_ERR_6149 = 6149,
|
||||
CUSTOM_OUT_OF_ORDER_COIL = 6149,
|
||||
|
||||
|
||||
// this is needed for proper enum size, this matters for malfunction_central
|
||||
|
|
|
@ -183,7 +183,7 @@ static void scheduleFuelInjection(int rpm, int injEventIndex, OutputSignal *sign
|
|||
return;
|
||||
}
|
||||
if (cisnan(durationUs)) {
|
||||
warning(CUSTOM_OBD_4, "NaN in scheduleFuelInjection", durationUs);
|
||||
warning(CUSTOM_NAN_DURACTION, "NaN in scheduleFuelInjection", durationUs);
|
||||
return;
|
||||
}
|
||||
#if EFI_PRINTF_FUEL_DETAILS || defined(__DOXYGEN__)
|
||||
|
|
|
@ -15,6 +15,8 @@ EXTERN_ENGINE;
|
|||
static cyclic_buffer<int> ignitionErrorDetection;
|
||||
static Logging *logger;
|
||||
|
||||
static const char *prevSparkName = NULL;
|
||||
|
||||
int isInjectionEnabled(engine_configuration_s *engineConfiguration) {
|
||||
// todo: is this worth a method? should this be inlined?
|
||||
return engineConfiguration->isInjectionEnabled;
|
||||
|
@ -42,7 +44,7 @@ void turnSparkPinLow(IgnitionEvent *event) {
|
|||
output->signalFallSparkId = event->sparkId;
|
||||
|
||||
if (!output->currentLogicValue) {
|
||||
warning(CUSTOM_ERR_6149, "out-of-order coil off %s", output->name);
|
||||
warning(CUSTOM_OUT_OF_ORDER_COIL, "out-of-order coil off %s", output->name);
|
||||
output->outOfOrder = true;
|
||||
}
|
||||
|
||||
|
@ -117,6 +119,16 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
|
|||
scheduleMsg(logger, "scheduling sparkUp ind=%d %d %s now=%d %d later", trgEventIndex, getRevolutionCounter(), iEvent->output->name, (int)getTimeNowUs(), (int)chargeDelayUs);
|
||||
#endif /* FUEL_MATH_EXTREME_LOGGING */
|
||||
|
||||
|
||||
if (rpm > 2 * engineConfiguration->cranking.rpm) {
|
||||
const char *outputName = iEvent->output->name;
|
||||
if (prevSparkName == outputName) {
|
||||
warning(CUSTOM_OBD_SKIPPED_SPARK, "looks like skipped spark event %d %s", getRevolutionCounter(), outputName);
|
||||
}
|
||||
prevSparkName = outputName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Note how we do not check if spark is limited or not while scheduling 'spark down'
|
||||
* This way we make sure that coil dwell started while spark was enabled would fire and not burn
|
||||
|
|
|
@ -294,5 +294,5 @@ int getRusEfiVersion(void) {
|
|||
return 123; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||
return 3211; // this is here to make the compiler happy about the unused array
|
||||
return 20161031;
|
||||
return 20161102;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue