Commit Graph

81 Commits

Author SHA1 Message Date
Matthew Kennedy b6e3f105df state sequence api doesn't use triggervalue #55 2023-02-28 02:25:38 -08:00
rusefillc 609608e025 findTriggerZeroEventIndex() failed fix #4935 2023-01-04 13:15:45 -05:00
Matthew Kennedy 7b47e77e58 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 6c8325c0c2 more fancy 2022-11-06 00:10:50 -04:00
Matthew Kennedy 9cd5553617 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
rusefillc cb3c070928 refactoring: type safety 2022-09-11 02:57:35 -04:00
Andrey 3c1cc0b857 trigger: in corner cases like NB2 and VQ35 those are not revolutions 2022-09-07 22:24:28 -04:00
Matthew Kennedy c2f61dc95f 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 54c339c0a4 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 5f1801f9d6 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 b243d3fca0 TriggerState -> TriggerDecoder (#4157) 2022-05-10 11:41:39 +03:00
rusefillc b555d9e82b toothed previous time #4019 2022-03-21 20:41:09 -04:00
Scott Smith 9d61fb4cfd 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
Matthew Kennedy b9f8409f59 correctly compute engine revolution number (#3586)
* add param

* first revolution is revolution 0, not revolution 1

* would you look at that, we sync one rev quicker!

* changelog

* rpm value
2021-11-21 09:01:27 +03:00
Scott Smith 93d31c6c9b 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 1a299a3221 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
Matthew Kennedy d3ec2b21d1 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 e3849b95d5 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
Andrey 9ad5ec8044 refactoring: getShaftSynchronized 2021-07-03 10:37:03 -04:00
Andrey bb5500dbb3 Trigger: warning code on normal engine start up #669
better TDC unit test approach?
2021-06-25 13:19:16 -04:00
Andrey 8d4b9c4535 Trigger: warning code on normal engine start up #669
making more code unit-testable
2021-06-25 12:50:19 -04:00
Andrey 57094f43cc refactoring: reducing code duplication 2021-06-25 10:55:46 -04:00
rusefillc 08e8764051 RAM efficiency of VR crank trigger shapes #2182 2021-01-04 00:26:05 -05:00
rusefillc 5ae3347927 6.1 Hemi V8 decoder #2010 2020-12-04 16:03:27 -05:00
rusefillc d191d31272 all triggers should be documented way nicer #2001 2020-12-04 14:00:49 -05:00
rusefillc d3a21bcb63 6.1 Hemi V8 decoder #2010 2020-12-04 01:02:09 -05:00
Matthew Kennedy e112bbd07e remove virtual calls from hot path (#1857)
* const ref-ify

* no virtual 

* even more const

* tests

* fix tests
2020-10-05 16:42:50 -04:00
Matthew Kennedy 060cfbd778 const ref-ify trigger (#1856)
* const ref-ify

* tests
2020-10-05 14:22:59 -04:00
rusefi f268af5165 const 2020-08-26 17:30:13 -04:00
rusefi 4ccb209df3 VVT support for VAG trigger #883 2020-08-24 02:23:13 -04:00
rusefi bdbee0d38b VVT support for VAG trigger #883 2020-08-24 02:01:50 -04:00
rusefi 0f9e8bf83e VVT support for VAG trigger #883 2020-08-24 01:21:42 -04:00
rusefi f5f416951a Trigger gap-check toothDuration array samples time at any event? fix #1658 2020-07-30 19:24:55 -04:00
rusefi adbaf9e179 better unit test logging 2020-07-19 14:17:15 -04:00
rusefi 4dd9edfcff reusing constant 2020-01-28 00:27:30 -05:00
rusefi ae228dff0e trigger refactoring 2020-01-26 14:20:55 -05:00
rusefi 19d318c8ee trigger refactoring 2020-01-26 13:51:35 -05:00
rusefi dfa8d9ccc9 refactoring trigger 2020-01-26 03:33:45 -05:00
rusefi 4f5aeea301 trigger refactoring 2020-01-25 02:00:33 -05:00
rusefi a222ecdfe1 happy new year unification 2020-01-13 21:57:43 -05:00
rusefi bcec694eb1 just a trivial massive rename: TriggerState > TriggerWaveform 2019-12-08 01:09:39 -05:00
rusefi a5ee6b13d5 Refactor Trigger System #635
injecting callback via parameters instead of nasty "bool isInitializingTrigger" field
2019-12-06 01:57:11 -05:00
rusefi edabed50f5 Refactor Trigger System #635
injecting callback via parameters via magic and potentially broken field manipulation
2019-12-06 01:05:19 -05:00
rusefi 561986d3e4 The Big Refactoring of 2019: folder structure #723 2019-12-04 01:11:10 -05:00
rusefi f34023a9ea Trying latest gcc 9 #1001 2019-11-07 11:28:49 -05:00
rusefi d6cf6c312a refactoring: extracting method to facilitate debugging 2019-08-07 22:02:08 -04:00
rusefi 6bda683fba random cleanup 2019-04-14 13:52:27 -04:00
rusefi 884c54a185 defined(__DOXYGEN__) ? #748 2019-04-12 22:07:03 -04:00
rusefi 4873082017 refactoring trigger simulation 2019-03-04 01:10:31 -05:00
rusefi 485b915499 reducing code duplication 2019-03-04 00:40:22 -05:00