Commit Graph

248 Commits

Author SHA1 Message Date
Andrey 99edf9484a docs 2022-11-16 15:23:42 -05:00
Andrey 6ca9b6eda7 refactoring: default parameter, global replace 2022-11-16 14:28:43 -05:00
Andrey f7d97e202e docs 2022-11-16 12:18:34 -05:00
rusefillc 32d3669a35 new trigger wheel shape for Benelli 3-cylinder engines #4744 2022-11-16 11:35:00 -05:00
Matthew Kennedy 5c50ad2db4
infer useOnlyRisingEdge by trigger type (#4621)
* most of the plumbing

* easy tests

* trigger types that are rise only

* configs

* change mode of various triggers

* vvt

* 898 test is now impossible 🥳

* s

* instant rpm test

* actually remove useOnlyRisingEdgeForTrigger

* remove vvtCamSensorUseRise

* s

* print

* one happy test

* another test

* happy testSomethingWeird

* happy testCamInput

* maybe fix it a different way

* better

* quad cam

* nb2 happy

* bad merge

* vvt test

* trigger.test1995FordInline6TriggerDecoder

* hellen gm e67

* changelog
2022-11-08 21:48:39 -05:00
rusefillc 87d6aa2ed9 minor trigger refactoring 2022-11-06 01:11:33 -04:00
rusefillc 43e3fce9b1 minor trigger refactoring 2022-11-05 22:42:33 -04:00
Matthew Kennedy f760ae11c1
simplify initializeSkippedToothTrigger (#4674) 2022-10-17 16:05:27 -04:00
Matthew Kennedy a773b3249a
remove 2jz trigger that's really 12 tooth crank (#4637)
* remove 2jz trigger that's really 12 tooth crank

* triggerimage hardcoded name
2022-10-05 21:59:17 -04:00
Matthew Kennedy ca623eb6ee
plumbing parts of 4621 (#4622)
* plumbing parts of 4621

* show error list

* exit on error too!

* this test has some unhealthy undefined behavior

* no uninitialized values

* no that doesn't work

* remove the invalid data and the bug becomes obvious
2022-09-25 18:49:54 -04:00
Matthew Kennedy 7139ddcda2
explicitly pass which edges we sync trigger on (#4607)
* require sync edge type

* s

* fix neon

* info printing

* put enums back

* auto gen enum fiddling
2022-09-23 20:39:41 -04:00
rusefillc c4699efe91 honda K enum rename 2022-09-23 20:13:14 -04:00
rusefillc 7cc41dfa75 human brain does need sleep 2022-09-11 12:40:24 -04:00
rusefillc 07727f5d0a Revert "refactoring: type safety"
This reverts commit ed7908a69d.
2022-09-11 11:14:20 -04:00
rusefillc ed7908a69d refactoring: type safety 2022-09-11 11:00:12 -04:00
rusefillc 2eca6ec3c7 refactoring: type safety 2022-09-11 05:41:01 -04:00
rusefillc 2a05a31550 refactoring: type safety 2022-09-11 03:46:50 -04:00
rusefillc 851e8e48d3 refactoring: type safety 2022-09-11 02:57:35 -04:00
rusefillc 6e71b72acc refactoring - reducing API between FW and Java 2022-09-11 02:16:47 -04:00
rusefillc 94762094a7 refactoring - reducing API between FW and Java 2022-09-11 01:59:44 -04:00
Andrey ab4b451195 os_access.h dead? 2022-09-07 15:56:45 -04:00
Andrey c1b218b772 refactoring: let's use different names for different things 2022-09-05 01:16:24 -04:00
Matthew Kennedy ca4936d3fe
rename and fix skyactiv cam mode (#4505) 2022-08-31 22:12:45 -04:00
Andrey 219a190fbc TT_VVT_MAZDA_MYSTERY 2022-08-28 22:43:03 -04:00
rusefillc 4b0c8c9ff2 TT_VVT_MAZDA_MYSTERY 2022-08-28 21:54:24 -04:00
Matthew Kennedy b662e59707
remove some uses of EFI_ERROR_CODE (#4496)
* lua hooks

* findAngleMatch

* s

* s
2022-08-28 09:43:21 -04:00
rusefillc 0424dd6f0e Extra gap ratios for custom trigger wheels fix #4375
these lines are now part of shared method
2022-07-23 10:00:55 -04:00
rusefillc a4347668c5 https://rusefi.com/forum/viewtopic.php?f=5&t=2353 2022-06-20 11:41:33 -04:00
rusefillc d639a42621 https://rusefi.com/forum/viewtopic.php?f=5&t=2353 2022-06-20 07:43:23 -04:00
Matthew Kennedy 932f5e1f30
cam/crank sync improvements (#4152)
* clarify getOperationMode

* wait for phase synchronize to transition to sequential mode

* one test

* encapsulate vvtSyncCounter

* test

* Add option to stop VVT sync above some RPM

* getOrZero

* Revert "synchronized Phase handling improvements fix #4099"

This reverts commit 32d46d1f09.

* Revert "m_hasSynchronizedSymmetrical handling improvements #4099"

This reverts commit d5e131b1d0.

* remove synchronizedPhase

* only crank needs this

* changelog

* needsDisambiguation()

* test

* s

* bad merge

* put the timer back

* s

* s

* changelog

* test for new behavior

* correct parameter order

* spelling

* s

* s

* s

* tests merge happy

* bad merge

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-06-09 17:21:22 -04:00
Matthew Kennedy 4ada633206
Remove third trigger channel (#4226)
* remove third trigger

* clean up the honda mess

* there was nothing novel about this engine config

* include

* missed a few

* s

* x

* changelog

* don't set the third trigger input

* don't redefine the same thing 3 times

* only two inputs!

* test
2022-06-01 21:24:20 -04:00
Matthew Kennedy c0d8cbfef4
Trigger cleanup init (#4222)
* extra parameter

* name decoders in constructor

* s
2022-06-01 00:55:34 -04:00
Matthew Kennedy 70c2689f1e
remove trigger duty cycle calculation (#4213)
* This field was ignored.

* move pad out

* gone

* make trigger configuration a little clearer

* even simpler!

* format

* test fix

* remove duty cycle thing
2022-05-30 22:39:57 -04:00
Matthew Kennedy f945e6efc9
trigger configuration refactoring for clarity (#4212)
* This field was ignored.

* move pad out

* gone

* make trigger configuration a little clearer

* even simpler!

* format

* test fix
2022-05-30 19:36:47 -04:00
Matthew Kennedy 66fffee321
More trigger encapsulation (#4207)
* trigger decoder returns a result

* TriggerFormDetails

* s

* don't reach out and touch the engine
2022-05-29 13:49:00 -04:00
Matthew Kennedy fe77f5127e
12 tooth crank mode (#4179)
* 12 tooth crank

* comment

* s

* rusefi config
2022-05-17 21:38:24 -04:00
Matthew Kennedy 907adc6583
remove 360 trigger (#4165)
* remove 360

* s

* simplify that mess
2022-05-11 06:15:06 -04:00
Matthew Kennedy b650bbe46c
Trigger gm 3 vs 5 (#4140)
* add parameter

* two modes

* add new mode to list

* format

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-05-06 08:25:44 -04:00
Matthew Kennedy 045cbcbff1
fix 36-2 trigger params (#4138)
* fix gap params

* changelog was wrong too

* typo

* binary log knock count and retard

* Revert "binary log knock count and retard"

This reverts commit 48b29d24d7.
2022-05-05 07:41:26 +03:00
rusefillc efccb2106d Corolla 1ZZ 2003 trigger improvements fix #4132 2022-05-04 02:45:44 -04:00
rusefillc e631988b22 Proper cam speed labels in triggers #4021 2022-04-03 12:22:47 -04:00
Andrey c2a97343f2 Trigger setup in TS is highly confusing: hide operation mode from users? #4031 2022-04-03 01:11:53 -04:00
rusefillc 96cc09d166 huh? 2022-04-02 21:01:29 -04:00
rusefillc ea94fc05ae Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077 2022-04-01 21:11:32 -04:00
Andrey 89054c3a31 new VVT trigger shape? 4-1 Toyota #1847 2022-03-23 19:25:13 -04:00
Andrey b3fdd790b5 new VVT trigger shape? #1847 2022-03-22 06:34:22 -04:00
Andrey f16088f20d Mitsubishi 4B11 support #4013 2022-03-20 11:24:08 -04:00
Andrey 402f36aad6 Mitsubishi 3A92 Support - 3 cylinder #4011 2022-03-19 22:06:19 -04:00
Andrey d72c60452a Mitsubishi 3A92 Support - 3 cylinder #4011 2022-03-19 17:57:35 -04:00
rusefillc 9bc4094e48 Mitsubishi 6G75 Support #4014 2022-03-19 16:28:06 -04:00
rusefillc b0772612cd Mitsubishi 3A92 Support - 3 cylinder #4011 2022-03-19 15:54:43 -04:00
rusefillc 9571f1fe67 Mitsubishi 4B11 support #4013 2022-03-19 15:52:42 -04:00
rusefillc aa7624950a Mitsubishi 3A92 Support (Issue #4011) 2022-03-19 12:01:57 -04:00
rusefillc 1d64929f33 Remove Miata MX5 NB1 trigger fix #3488 2022-01-31 18:20:43 -05:00
rusefillc 4292c2fb1d MAP phase sensing fix #3544
removing dead implementation
2021-12-16 21:28:27 -05:00
rusefillc fda7a3a775 Engine phase wrap around in log #3645
refactoring & docs
2021-12-02 17:06:20 -05:00
Andrey 0ec8b8d46c reliable 32/2 trigger shape 2021-11-25 20:45:58 -05:00
Andrey 48ed80ffb9 MAP phase sensing #3544 2021-11-24 23:06:52 -05:00
Andrey 228d5ee810 MAP phase sensing #3544 2021-11-24 22:41:49 -05:00
Scott Smith ba4a00d3bb
Drop SingleChannelStateSequence in favor of MultiChannelStateSequenceWithData (#3519)
* Drop SingleChannelStateSequence in favor of MultiChannelStateSequenceWithData

Most all the users were Multi* anyways, so just improve that:
1. Allow up to 8 waveforms to share one byte per timestamp.  It could be better but this is simple
   and gets most of the benefit.
2. Use a wrapper structure to handle reserving space for the arrays.  Makes the interface simpler
   and more rigid.  Also saves 4 bytes per Multi*.  Downside is access is now via -> and *,
   not . and (nothing).

Saves 224 bytes of BSS, 1832 bytes of RAM4/CCM, 952 bytes of TEXT, and 103 bytes of RODATA

* Instantiate a base_t to make debugging easier.
Also fixes crash on real firmware by using &m_base instead - LTO optimization issue?

* No magical templated StaticAlloc thingy.  Just virtual functions.
2021-11-21 04:56:07 -05:00
Scott Smith 823d9a07e0
Programmatically replace ENGINE() and CONFIG() with engine-> etc (#3565)
git grep -l -w ENGINE | xargs sed -i -r "s/ENGINE\(([]a-zA-Z_0-9.[]+)\)/engine->\1/g"

git grep -l -w CONFIG | xargs sed -i -r "s/([^a-zA-Z_])CONFIG\(([]a-zA-Z_0-9.[]+)\)/\1engineConfiguration->\2/g"
2021-11-17 03:54:21 -05:00
Matthew Kennedy 8cdac4cac0
remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -05:00
rusefillc 0813266ee1 trigger refactoring & docs 2021-11-14 15:35:11 -05:00
Matthew Kennedy d591a5ad26
mercedes two lobe trigger testing (#3543)
* mercedes

* config

* break;

* I did the gap ratio math wrong

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-13 21:50:04 -05:00
Scott Smith 713083baa5
Convert TriggerWaveform::wave to a pointer in preparation for code-defined sequences. (#3528)
It will eventually be class to support dynamic universal patterns in addition to ROM-based
tables.
2021-11-11 13:19:25 -05:00
Scott Smith 2f4d123052
Change users of MultiChannelStateSequence to use the API (#3524)
Better than reaching into members that should be private. I didn't feel like actually making
them private though, as one user validates pinStates isn't NULL.
2021-11-11 09:19:22 -05:00
Scott Smith d4c4db9a12
Move phaseCount into MultiChannelStateSequence (#3520)
We can them drop the field from a bunch of callers, simplifying the code.
2021-11-10 19:47:27 -05:00
Scott Smith dac67235c4
Don't keep a separate MultiChannelStateSequence for the trigger emulator, version 2. (#3517)
All it wants is to use the main trigger state, so don't bother copying it.  Instead, change
PwmConfig to take a const pointer to a Multi.*Sequence, then make all the users adapt.  Worse
fallout is that SimplePwm now has its own Multi.*Sequence, but PwmConfig is downgraded to a
pointer, so that's only a net +4 bytes.  And we can make the overhead of Multi.*Sequence much lower
using embedded arrays, which only the caller can do since it knows the maximum size... (for another
day...)

Also remove SimplePwm's 2nd copy of SingleChannelStateSequence.  It served no purpose.

Saves 1992 bytes of BSS and 24 bytes of RAM4 (latter probably due to SimplePwm change)
2021-11-10 07:01:20 -05:00
rusefillc 1db9a02f1d Revert "Don't keep a separate MultiChannelStateSequence for the trigger emulator. (#3513)"
This reverts commit 280dfa94e7.
2021-11-09 20:42:23 -05:00
Scott Smith 280dfa94e7
Don't keep a separate MultiChannelStateSequence for the trigger emulator. (#3513)
All it wants is to use the main trigger state, so don't bother copying it.  Instead, change
PwmConfig to take a const pointer to a Multi.*Sequence, then make all the users adapt.  Worse
fallout is that SimplePwm now has its own Multi.*Sequence, but PwmConfig is downgraded to a
pointer, so that's only a net +4 bytes.  And we can make the overhead of Multi.*Sequence much lower
using embedded arrays, which only the caller can do since it knows the maximum size... (for another
day...)

Also remove SimplePwm's 2nd copy of SingleChannelStateSequence.  It served no purpose.

Saves 1992 bytes of BSS and 24 bytes of RAM4 (latter probably due to SimplePwm change)
2021-11-09 14:35:07 -05:00
Scott Smith 158f719d95
Save ~2800 bytes of RAM by not caching angle->trigger mapping (#3506)
Memory seems more valuable than CPU; use the O(lg n) lookup by angle.  A side effect is that it
seems to fix trigger lookup for the second phase of TRIGGERTYPE 53 544 TT_TRI _TACH 0.00
2021-11-09 07:03:27 -05:00
Andrey 9ac1575777 reducing complexity 2021-11-07 01:57:32 -05:00
rusefillc 656b8c3429 refactoring - magic constant bad 2021-11-07 00:03:16 -04:00
Matthew Kennedy 036c1b17d3
make master happy (#3467) 2021-11-05 16:01:13 -04:00
Matthew Kennedy 2b9696442e
nissan MR18DE VVT cam pattern (#3466)
* refactoring nissan trigger

* comments

* plumbing

* b

* enums

* image

* image

* implement decoder

* reshuffle

* don't case unused

* dead trigger enums
2021-11-05 15:33:22 -04:00
Matthew Kennedy 365691cb37
nissan 4yl crank pattern (#3462)
* refactoring nissan trigger

* comments

* plumbing

* b
2021-11-05 07:15:03 -04:00
rusefillc 4ef959a60e generate java enum from C enum? generate both C and java from yaml? #2102 2021-10-25 11:05:45 -04:00
Andrey 229419d04b Honda K cam wheels #3405 2021-10-24 17:12:19 -04:00
rusefillc eb05f4594e very old very dead code 2021-10-20 12:57:07 -04:00
Andrey b0ae87054a https://rusefi.com/forum/viewtopic.php?f=5&t=2143 Suzuki G13B tooth pattern 2021-10-04 19:29:58 -04:00
rusefillc eccdf18eec https://rusefi.com/forum/viewtopic.php?f=5&t=2143 Suzuki G13B tooth pattern 2021-10-04 11:25:27 -04:00
Andrey 301f5e7ec4 https://rusefi.com/forum/viewtopic.php?f=5&t=2117 2021-09-12 11:56:12 -04:00
rusefi 83c0372729 https://rusefi.com/forum/viewtopic.php?f=5&t=2117
Ford TFI PIP
2021-09-11 23:42:05 -04:00
Matthew Kennedy c72bd07179
enable address sanitizer (#3217)
* enable asan

* lua

* this is dead and leaky

* leaky nissan

* fix pwm generator use-after-stack

* initializers

* prevent problems in case of invalid trigger shape

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-09-05 05:56:59 -04:00
rusefillc 526340de78 Subaru svx vvt #3210
helping or not
2021-08-31 06:05:57 -04:00
rusefillc 1a1b7f95c0 Subaru svx vvt #3210
helping or not
2021-08-31 05:54:04 -04:00
rusefillc 3d4ff9083b Pavel says there are issues 2021-08-11 04:16:51 -04:00
Andrey 167f2dbba0 Nissan 4 cylinder QR trigger wheel #3118 2021-08-08 04:56:56 -04:00
Andrey a2d18fa0b7 Nissan 4 cylinder QR trigger wheel #3118 2021-08-08 04:45:40 -04:00
Matthew Kennedy b52d50bbf2
Use pch in lots of files (#3066)
* most engine.h

* most engine_configuration

* more

* more

* more

* more

* more

* moooooore

* ok I'm done for now

* oops
2021-07-26 01:05:17 -04:00
Matthew Kennedy 5f3464b204
Fix prepareEventAngles for symmetrical crank triggers (#2982)
* fix and make code legible

* update test to check every tooth

* symmetrical crank

* simplify findTriggerPosition

* make getAngle intelligable
2021-07-17 23:27:20 -04:00
Andrey 9345e5d2e0 NB2 trigger shape does not seem to match JimStim #2980
only first steps of unit test
2021-07-17 17:47:32 -04:00
Andrey 180d7bc899 kaiju is asking for vq30de trigger wheel decoder #2974 2021-07-17 01:10:13 -04:00
Andrey f54b3cd1b2 refactoring 2021-07-17 00:46:39 -04:00
Andrey df558303d3 kaiju is asking for vq30de trigger wheel decoder #2974 2021-07-17 00:27:56 -04:00
Matthew Kennedy 2ce7777865
don't require EXTERN_ENGINE in every file (#2969)
* move enginePins

* no more extern engine

* uses

* more

* extern config too

* put this where it belongs

* include correct header

* merge
2021-07-16 18:13:33 -04:00
rusefillc 090725d273 reducing warnings 2021-07-13 14:50:10 -04:00
Andrey 293bf45763 refactoring - reusing magic constant 2021-07-05 23:07:36 -04:00
Andrey 1660a5b3fd Nissan progress 2021-07-02 19:57:26 -04:00
Andrey ae7937402c Nissan VVT trigger decoder #2887 2021-07-01 22:27:43 -04:00