Page 1 of 1

idle controller ignition

Posted: Sat Oct 25, 2014 4:30 pm
by rus084
What about the idle speed regulator by adjusting the ignition timing?
I did it with the help of "pid.cpp" . i right?
what factors install by default?

Code: Select all

+static msg_t iiThread(int param) {
+	(void)param;
+	chRegSetThreadName("Idle Curve thread");
+	static Pid idling_pid(engineConfiguration->idlePfactor,engineConfiguration->idleIfactor,engineConfiguration->idleDfactor,engineConfiguration->minIgnCurve,engineConfiguration->maxIgnCurve);
+
+	while (TRUE) {
+		chThdSleepMilliseconds(boardConfiguration->idleThreadPeriod);
+		if (!isCranking()) {
+		curve= idling_pid.getValue(engineConfiguration->targetIdleRpm,getRpm(),boardConfiguration->idleThreadPeriod);
+		}
+	}
+#if defined __GNUC__
+	return -1;
+#endif
+}
+
+
+
+void initIdlignInginion(void) {
+	chThdCreateStatic(iiThreadStack, sizeof(iiThreadStack), LOWPRIO, (tfunc_t) iiThread, NULL);
+}
+
+
+float getIgnCurve() {
+	return curve;
+}
+
+
+int isIdleMode(void) {
+	if (getTPS(engineConfiguration) > engineConfiguration->maxIdleTps) {
+		return true;
+	}
+	return false;
+}

Re: idle controller ignition

Posted: Sat Oct 25, 2014 5:02 pm
by AndreyB
Did you get it idle your engine?

Re: idle controller ignition

Posted: Sat Oct 25, 2014 5:37 pm
by rus084
no , i need discovery board