idle controller ignition

It's all about the code!
Post Reply
User avatar
rus084
contributor
contributor
Posts: 678
Joined: Sun Dec 01, 2013 1:40 pm
Location: Russia , Stavropol

idle controller ignition

Post 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;
+}
User avatar
AndreyB
Site Admin
Posts: 14727
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: idle controller ignition

Post by AndreyB »

Did you get it idle your engine?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
rus084
contributor
contributor
Posts: 678
Joined: Sun Dec 01, 2013 1:40 pm
Location: Russia , Stavropol

Re: idle controller ignition

Post by rus084 »

no , i need discovery board
Post Reply