auto-sync
This commit is contained in:
parent
b3a5658033
commit
72607fc12c
|
@ -58,6 +58,9 @@ public:
|
||||||
* when an event is scheduled within the next revolution.
|
* when an event is scheduled within the next revolution.
|
||||||
*/
|
*/
|
||||||
IgnitionEventList ignitionEvents[2];
|
IgnitionEventList ignitionEvents[2];
|
||||||
|
|
||||||
|
uint64_t stopEngineRequestTime;
|
||||||
|
bool_t isStopEngineRequestPending;
|
||||||
};
|
};
|
||||||
|
|
||||||
void initializeIgnitionActions(float advance, float dwellAngle,
|
void initializeIgnitionActions(float advance, float dwellAngle,
|
||||||
|
|
|
@ -572,6 +572,7 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType, Engine *e
|
||||||
|
|
||||||
engine_configuration2_s::engine_configuration2_s() {
|
engine_configuration2_s::engine_configuration2_s() {
|
||||||
engineConfiguration = NULL;
|
engineConfiguration = NULL;
|
||||||
|
isStopEngineRequestPending = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void engine_configuration2_s::precalc() {
|
void engine_configuration2_s::precalc() {
|
||||||
|
|
|
@ -22,7 +22,7 @@ static LENameOrdinalPair leMaf(LE_METHOD_MAF, "maf");
|
||||||
static LENameOrdinalPair leVBatt(LE_METHOD_VBATT, "vbatt");
|
static LENameOrdinalPair leVBatt(LE_METHOD_VBATT, "vbatt");
|
||||||
static LENameOrdinalPair leFan(LE_METHOD_FAN, "fan");
|
static LENameOrdinalPair leFan(LE_METHOD_FAN, "fan");
|
||||||
static LENameOrdinalPair leCoolant(LE_METHOD_COOLANT, "coolant");
|
static LENameOrdinalPair leCoolant(LE_METHOD_COOLANT, "coolant");
|
||||||
static LENameOrdinalPair leAcToggle(LE_METHOD_AC_TOGGLE, "ac_toggle");
|
static LENameOrdinalPair leAcToggle(LE_METHOD_AC_TOGGLE, "ac_on_switch");
|
||||||
static LENameOrdinalPair leFanOnSetting(LE_METHOD_FAN_ON_SETTING, "fan_on_setting");
|
static LENameOrdinalPair leFanOnSetting(LE_METHOD_FAN_ON_SETTING, "fan_on_setting");
|
||||||
static LENameOrdinalPair leFanOffSetting(LE_METHOD_FAN_OFF_SETTING, "fan_off_setting");
|
static LENameOrdinalPair leFanOffSetting(LE_METHOD_FAN_OFF_SETTING, "fan_off_setting");
|
||||||
static LENameOrdinalPair leTimeSinceBoot(LE_METHOD_TIME_SINCE_BOOT, "time_since_boot");
|
static LENameOrdinalPair leTimeSinceBoot(LE_METHOD_TIME_SINCE_BOOT, "time_since_boot");
|
||||||
|
|
|
@ -481,6 +481,7 @@ static void setIgnitionPin(const char *indexStr, const char *pinName) {
|
||||||
boardConfiguration->ignitionPins[index] = pin;
|
boardConfiguration->ignitionPins[index] = pin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set_idle_pin none
|
||||||
static void setIdlePin(const char *pinName) {
|
static void setIdlePin(const char *pinName) {
|
||||||
brain_pin_e pin = parseBrainPin(pinName);
|
brain_pin_e pin = parseBrainPin(pinName);
|
||||||
// todo: extract method - code duplication with other 'set_xxx_pin' methods?
|
// todo: extract method - code duplication with other 'set_xxx_pin' methods?
|
||||||
|
@ -726,8 +727,9 @@ static void disableIgnition(void) {
|
||||||
scheduleMsg(&logger, "ignition disabled");
|
scheduleMsg(&logger, "ignition disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void stopEngine(void) {
|
static void stopEngine(Engine *engine) {
|
||||||
// todo
|
engine->engineConfiguration2->stopEngineRequestTime = getTimeNowUs();
|
||||||
|
engine->engineConfiguration2->isStopEngineRequestPending = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_WAVE_CHART
|
#if EFI_WAVE_CHART
|
||||||
|
@ -795,7 +797,7 @@ void initSettings(engine_configuration_s *engineConfiguration) {
|
||||||
addConsoleActionI("set_rpm_hard_limit", setRpmHardLimit);
|
addConsoleActionI("set_rpm_hard_limit", setRpmHardLimit);
|
||||||
addConsoleActionI("set_firing_order", setFiringOrder);
|
addConsoleActionI("set_firing_order", setFiringOrder);
|
||||||
addConsoleActionI("set_algorithm", setAlgorithm);
|
addConsoleActionI("set_algorithm", setAlgorithm);
|
||||||
addConsoleAction("stopengine", stopEngine);
|
addConsoleActionP("stopengine", (VoidPtr)stopEngine, engine);
|
||||||
|
|
||||||
// todo: refactor this - looks like all boolean flags should be controlled with less code duplication
|
// todo: refactor this - looks like all boolean flags should be controlled with less code duplication
|
||||||
addConsoleAction("enable_injection", enableInjection);
|
addConsoleAction("enable_injection", enableInjection);
|
||||||
|
|
Loading…
Reference in New Issue