This commit is contained in:
rusefi 2017-04-27 13:06:15 -04:00
commit 84352da629
5 changed files with 26 additions and 6 deletions

View File

@ -22,11 +22,11 @@
* coil1/4 (p1 +5 VP) PE14
* coil2/2 (p1 +5 VP) PC7
*
* tachometer +5 VP (p3 +5 VP) PE8
* alternator +5 VP (p3 +5 VP) PE10
* MIL check engine (p4 no VP) PD9
* tachometer +5 VP (p3 +12 VP) PE8
* alternator +5 VP (p3 +12 VP) PE10
*
* VVT solenoid on aux PID#1 PE3
* warning light PE6
*
*
*/
@ -218,7 +218,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->dizzySparkOutputPin = GPIOE_8;
engineConfiguration->dizzySparkOutputPin = GPIOE_8; // tachometer
// set global_trigger_offset_angle 0
engineConfiguration->globalTriggerAngleOffset = 0;
@ -229,7 +229,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
// set cranking_timing_angle 10
engineConfiguration->crankingTimingAngle = 10;
// set cranking_fuel 4
engineConfiguration->cranking.baseFuel = 4;
engineConfiguration->cranking.baseFuel = 4; // this value for return-less NB miata fuel system, higher pressure
boardConfiguration->ignitionPins[0] = GPIOE_14;
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
@ -286,6 +286,8 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
boardConfiguration->malfunctionIndicatorPin = GPIOE_6; // just for a test
/**
* http://miataturbo.wikidot.com/fuel-injectors
* 01-05 (purple) - #195500-4060
@ -319,4 +321,8 @@ void setMazdaMiata2003EngineConfigurationNewBoard(DECLARE_ENGINE_PARAMETER_F) {
setEgoSensor(ES_14Point7_Free PASS_ENGINE_PARAMETER);
// set cranking_fuel 8
engineConfiguration->cranking.baseFuel = 8; // higher value for return system NA conversion since lower fuel pressure
}

View File

@ -547,6 +547,16 @@ void chDbgPanic3(const char *msg, const char * file, int line);
#define hasFatalError() (FALSE)
#endif
#define chDbgAssert(c, remark) do { \
if (CH_DBG_ENABLE_ASSERTS != FALSE) { \
if (!(c)) { \
/*lint -restore*/ \
chSysHalt(remark); \
} \
} \
} while (false)
#endif /* _CHCONF_H_ */
/** @} */

View File

@ -211,6 +211,8 @@ void startInputDriver(digital_input_s *hw, bool isActiveHigh) {
}
wave_icucfg.channel = getInputCaptureChannel(hw->brainPin);
efiIcuStart(driver, &wave_icucfg);
efiAssertVoid(driver != NULL, "di: driver is NULL");
efiAssertVoid(driver->state == ICU_READY, "di: driver not ready");
icuStartCapture(driver); // this would change state from READY to WAITING
icuEnableNotifications(driver);
}

View File

@ -123,6 +123,8 @@ static ICUDriver *turnOnTriggerInputPin(const char *msg, brain_pin_e hwPin, ICUC
efiIcuStart(driver, icucfg);
if (driver->state == ICU_READY) {
efiAssert(driver != NULL, "ti: driver is NULL", NULL);
efiAssert(driver->state == ICU_READY, "ti: driver not ready", NULL);
icuStartCapture(driver); // this would change state from READY to WAITING
icuEnableNotifications(driver);
} else {

View File

@ -251,5 +251,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 20170424;
return 20170426;
}