Commit Graph

199 Commits

Author SHA1 Message Date
Andrey 0337cb44ac Mitsubishi 4G93 Trigger issues #4918
adding more info on the trigger images
2023-01-03 15:44:13 -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
Andrey 77caa77b4b trigger refactoring: instance RPM fix #4740 2022-11-06 12:03:55 -05:00
Andrey 65f5c00616 trigger refactoring: instance RPM #4740 2022-11-06 11:56:18 -05:00
Andrey 9edfda7f72 trigger refactoring: instance RPM #4740 2022-11-06 11:45:51 -05:00
Andrey ba17b83bea trigger refactoring: instance RPM #4740 2022-11-06 11:12:20 -05:00
Andrey f8cce72779 trigger refactoring: instance RPM #4740 2022-11-06 10:58:04 -05:00
rusefillc 2d96fb3ef6 minor trigger refactoring 2022-11-06 00:32:38 -04:00
rusefillc 4c3c34518a minor trigger refactoring 2022-11-05 22:42:33 -04:00
rusefillc cb9e33d501 dead lines 2022-11-05 17:21:30 -04:00
Andrey G cc9b1517ac compile warnings: signed vs unsigned and unused (#4713) 2022-10-30 09:47:53 -04:00
Matthew Kennedy dbf8a1ea2a #4619 (#4620) 2022-09-25 07:40:28 -04:00
Matthew Kennedy 556769b181 terrible horrible typo (#4597) 2022-09-20 12:39:16 -04:00
Andrey f5a5764429 deep rabbit holes are the best ones!
refactoring: encapsulation
2022-09-14 02:35:55 -04:00
Andrey 579f3df7ad deep rabbit holes are the best ones!
refactoring: encapsulation
2022-09-14 01:53:17 -04:00
Andrey G 2b4012b279 dead code, reduce typedefs (#4566)
* Do lightweight checks first

* Dead getTimeIgnitionSeconds()

Dead since 5274cffff3

* Get rid of efitime_t.

Purpose are not clear. Use efitick_t where ticks are used,
use efitimeus_t for uS, use efitimems_t or efitimems64_t for mS.

* Fix unit tests

* Fix misc: stm32f1_test_project
2022-09-11 16:08:11 -04:00
Andrey G bbb71c4e7d Supress tons of warning from triggers (#4565) 2022-09-11 15:25:58 -04:00
rusefillc cb3c070928 refactoring: type safety 2022-09-11 02:57:35 -04:00
rusefillc f9b849dd8f refactoring - reducing API between FW and Java 2022-09-11 02:16:47 -04:00
Andrey 3c1cc0b857 trigger: in corner cases like NB2 and VQ35 those are not revolutions 2022-09-07 22:24:28 -04:00
Andrey 8253156233 trigger: in corner cases like NB2 and VQ35 those are not revolutions 2022-09-07 21:45:59 -04:00
Matthew Kennedy 670c2e4afe reset instant RPM in case of cam resync (#4544) 2022-09-06 21:38:35 -04:00
Matthew Kennedy fba0906942 more granular trigger error messages (#4526)
* granular trigger error messages

* adjust test expectations

* explicitly test behavior
2022-09-04 09:15:24 -04:00
Matthew Kennedy dfd340e8c3 log the state of hasSynchronizedPhase() (#4478)
* s

* log whether we've synced phase

* trigger_state_primary

* need that file

* engine state is not the right spot
2022-08-24 18:11:05 -04:00
Matthew Kennedy 27c98f70fe 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 e64c8cfccb.

* Revert "m_hasSynchronizedSymmetrical handling improvements #4099"

This reverts commit 5454b8f509.

* 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 56e7acd869 Trigger cleanup init (#4222)
* extra parameter

* name decoders in constructor

* s
2022-06-01 00:55:34 -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 d85ed5f3c0 trigger decoder returns a result (#4206) 2022-05-28 09:01:45 -04:00
Matthew Kennedy 65db5aacaa Fix trigger error indicator (#4185)
* test and fix

* more shards!
2022-05-19 09:43:42 -04:00
Matthew Kennedy cf89b42716 move logic in to trigger decoder (#4162)
* move logic in to trigger decoder

* status loop

* minor cleanup

* s
2022-05-10 23:55:28 +03:00
Matthew Kennedy b243d3fca0 TriggerState -> TriggerDecoder (#4157) 2022-05-10 11:41:39 +03:00
Matthew Kennedy 05dd33ddb3 switch back to flag (#4155) 2022-05-10 07:52:29 +03:00
Matthew Kennedy 55fdd3f3c7 encapsulate stuff properly (#4154) 2022-05-09 15:46:36 -04:00
rusefillc e64c8cfccb synchronized Phase handling improvements fix #4099 2022-05-09 04:36:03 -04:00
rusefillc 394d1fe961 refactoring: bringing method names up to date 2022-05-08 09:04:27 -04:00
rusefillc b2771f9b44 Remove value copy from controller into outputChannels #4095 2022-05-08 08:50:27 -04:00
rusefillc b555d9e82b toothed previous time #4019 2022-03-21 20:41:09 -04:00
Matthew Kennedy d90d6705cf adjustment to #3722 (#3723)
* s

* behold, another bug a test caught

* test

* test generates usable trigger pattern so it works correctly

* comment

* don't need that
2021-12-31 01:21:21 -05:00
Matthew Kennedy 041a3e12a3 extract isSyncPoint function (#3726)
* extract isSyncPoint

* test because why not

* check vvt resync nb2

* clean up noise from test case

* clarify and comment
2021-12-30 11:39:04 -05:00
Matthew Kennedy b392a7120e improved noFiringUntilVvtSync logic (#3696)
* s

* poke

* poke again for science

* kick for science

* kick

* kick

* comment kick

* s

* don't try to compare the array decay pointer to 0 (!)

* collateral damage

* adjust miata sync

* reset trigger states correctly on engine stop

* s

* nissan MR too
2021-12-27 12:09:38 -05:00
rusefillc 71542ea6b9 live data this 2021-12-09 22:02:47 -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 dac2ae9b1d Programmatically remove EnginePtr/inject, EXPAND_Engine, and WITH_ENGINE_TEST_HELPER* (#3560)
* Programmatically remove EnginePtr/inject, EXPAND_Engine, and WITH_ENGINE_TEST_HELPER*

for i in ": public EnginePtr " ", public EnginePtr" "EXPAND_Engine;" "EXPAND_Engine"; do
    git grep -l "$i" | xargs sed -i "s/$i//g"
done

git grep -l "inject" | xargs sed -i "/inject[(][)]/d"

for i in WITH_ENGINE_TEST_HELPER_SENS WITH_ENGINE_TEST_HELPER_BOARD_CALLBACK WITH_ENGINE_TEST_HELPER; do
    git grep -l "$i" | xargs sed -i "s/$i/EngineTestHelper eth/g"
done

git checkout firmware/controllers/core/engine_ptr.h
git checkout unit_tests/global.h

* Review fixups.
2021-11-16 16:52:11 -05:00
Matthew Kennedy 7296593448 remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -05:00
Matthew Kennedy bd04dc8352 less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
Scott Smith 9b40e68155 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
Matthew Kennedy e3e5e57eac instant rpm uses full engine cycle (#3077)
* instant rpm uses full engine cycle

* turn off fast spinup for this test
2021-07-30 08:18:24 -04:00
Andrey e8aef0dcd3 VVT position of first cam is off on first cycle fix #2987 2021-07-22 01:02:37 -04:00
Andrey c433c20a36 simplify quad vvt test #3018
better parameter name and explicit constraint clarification
2021-07-21 17:45:35 -04:00