speeduino icon indicating copy to clipboard operation
speeduino copied to clipboard

Fix Jeep2000 decoder

Open jonbills opened this issue 2 years ago • 4 comments

getCrankAngle_Jeep2000() sets crankangle = 146 if toothcurrentcount = 0, because last tooth was cam tooth which is 146 ATDC, however, all the timing and angle calculations are not done on the cam tooth read, so crankangle should be set to 114 for previous crank tooth. problem was found by @jaky 47 on Slack, and fix tested and confirmed by him.

jonbills avatar Jul 21 '22 21:07 jonbills

ooh, should this have been a PR against the 202207-fixes branch instead?

jonbills avatar Jul 21 '22 21:07 jonbills

Problem description in #897

jonbills avatar Jul 22 '22 16:07 jonbills

@jonbills, should the code comment have said "//This is the special case to handle when the 'last tooth' seen was the cam tooth. 146 is the angle at which the cam tooth goes high." Did 118 degrees fix the #897 issue? Perhaps 114 degrees vs. 118 degrees is close enough but the crank tooth degrees in this decoder use rising edge so 114 degrees would be more accurate.

JaredSellers4 avatar Jul 23 '22 04:07 JaredSellers4

It certainly fixed the problem of the duplicate and very early signal. I think you're right that 114 would be more correct. I'll update to that. Most of the comment is the original authors, I just appended a note on the correction, but yes!

jonbills avatar Jul 23 '22 07:07 jonbills

redoing as two PRs - one an LTS 'fix' for the original logic error , the other a non LTS 'improvements' (noise filtering)

jonbills avatar Aug 13 '22 11:08 jonbills