Search found 245 matches

by AngelMarc
Tue Jun 17, 2025 8:44 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

Shit, I think the AI generated currentOnDelay11 = Scaled; currentOffDelay11 = Dwell; currentOnDelay4 = ScaledOffset; currentOffDelay4 = Scaled3; } // --- Check for new pulse triggers from crank handler --- if (triggerPulse11) { triggerPulse11 = false; pulseStartTime11 = micros(); pulseActive11 = tru...
by AngelMarc
Tue Jun 17, 2025 8:25 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

Think I'll just do TDC for pattern match. Allows more error in timing with rapid RPM change, but seriously simplifies setup instructions, and the later planned cam sensor logic. Also allows the most max RPM potential with dwell timing without stopping 0 degree advance from working. If anybody wants ...
by AngelMarc
Mon Jun 16, 2025 7:35 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

Without updating original post, I'm going to look into adding - "keyed" on off, because just cutting power to fuel or spark causes unpredictable spark timing or lean condition. You'll want to be able to stop without blowing the engine if your throttle sticks open or something, or a nitrous...
by AngelMarc
Mon Jun 16, 2025 7:31 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

What a way to start my morning.
But it's fixed, updated original post.
Compiles for Teensy 4.
Capture.PNG
Capture.PNG (35.65 KiB) Viewed 174 times
And the constraint for indexing the array was set above zero, to same value I wanted to cut fuel; so it was never "less than".
by AngelMarc
Mon Jun 16, 2025 7:25 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

God damn it. had to fix low RPM fuel cut too.
by AngelMarc
Mon Jun 16, 2025 7:14 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

Clearly I need to go back to putting updates in most recent comment and leave the original post alone.
After that test, I updated original post and verified it at least compiles for Teensy.
by AngelMarc
Mon Jun 16, 2025 7:11 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

Silver lining, my dumb ass broke it with the low RPM cut earlier.
error.PNG
error.PNG (42.49 KiB) Viewed 182 times
AI fixed it...
fix.PNG
fix.PNG (33.85 KiB) Viewed 182 times
Didn't add the high RPM fuel cut.
Retested and measured high cut.
highcut.PNG
highcut.PNG (55.99 KiB) Viewed 182 times
Low works too. Had to manually count time per division at such low speed.
lowcut.PNG
lowcut.PNG (55.53 KiB) Viewed 182 times
by AngelMarc
Mon Jun 16, 2025 6:51 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

Rev limiter is broken.
by AngelMarc
Mon Jun 16, 2025 6:40 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

Fixed. Compiles for Teensy without braking Pico. Haven't tested teensy and don't plan to any time soon. the ";". "UL" in the RPM averaging, rev limiter, and constraint line. Backup had the rev limiter but not the 20RPM minimum. Added that to backup. Double checking those features...
by AngelMarc
Mon Jun 16, 2025 6:18 pm
Forum: Tool Development
Topic: Coding my own aftermarket ECU [beta available]
Replies: 171
Views: 13744

Re: Coding my own aftermarket ECU [beta available]

ohhhh fuck...
Shouldn't have updated original post without testing on Pico.
Luckily I saved a copy. That was before the rev limiter addition.
It'll be a minute.