Commit Graph

203 Commits

Author SHA1 Message Date
rusefillc 850d79d89d shall we be just a little less Toyota 2023-11-01 09:48:33 -04:00
Andrey a2a5fda3ce spelling is important 2023-09-09 19:51:09 -04:00
rusefi 78e48d3718 only:timer.h goes to libfirmware! 2023-08-30 23:11:24 -04:00
rusefillc 3031818f3e weird: happy running car shows repetitive pattern of unrealistic vvtSyncGapRatio fix #5152 2023-03-21 19:39:39 -04:00
Andrey def809aa39 Mitsubishi 4G93 Trigger issues #4918
adding more info on the trigger images
2023-01-03 15:44:13 -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
Andrey 1475ecf273 trigger refactoring: instance RPM fix #4740 2022-11-06 12:03:55 -05:00
Andrey 77a3f5d795 trigger refactoring: instance RPM #4740 2022-11-06 11:56:18 -05:00
Andrey 7b10b32958 trigger refactoring: instance RPM #4740 2022-11-06 11:45:51 -05:00
Andrey d75bf59cdc trigger refactoring: instance RPM #4740 2022-11-06 11:12:20 -05:00
Andrey b5796c121d trigger refactoring: instance RPM #4740 2022-11-06 10:58:04 -05:00
rusefillc e3fd84ed08 minor trigger refactoring 2022-11-06 00:32:38 -04:00
rusefillc 43e3fce9b1 minor trigger refactoring 2022-11-05 22:42:33 -04:00
rusefillc 6c3899f401 dead lines 2022-11-05 17:21:30 -04:00
Andrey G e7b06cbfca
compile warnings: signed vs unsigned and unused (#4713) 2022-10-30 09:47:53 -04:00
Matthew Kennedy b45f84fe20
#4619 (#4620) 2022-09-25 07:40:28 -04:00
Matthew Kennedy 6dd933ea86
terrible horrible typo (#4597) 2022-09-20 12:39:16 -04:00
Andrey 0e91914266 deep rabbit holes are the best ones!
refactoring: encapsulation
2022-09-14 02:35:55 -04:00
Andrey 6cdb0dc0af deep rabbit holes are the best ones!
refactoring: encapsulation
2022-09-14 01:53:17 -04:00
Andrey G 55c1f53c75
dead code, reduce typedefs (#4566)
* Do lightweight checks first

* Dead getTimeIgnitionSeconds()

Dead since 81fffe87b7

* 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 e2addd1951
Supress tons of warning from triggers (#4565) 2022-09-11 15:25:58 -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
Andrey 8e49542600 trigger: in corner cases like NB2 and VQ35 those are not revolutions 2022-09-07 22:24:28 -04:00
Andrey 00fea2cbe5 trigger: in corner cases like NB2 and VQ35 those are not revolutions 2022-09-07 21:45:59 -04:00
Matthew Kennedy aeeef3dbd0
reset instant RPM in case of cam resync (#4544) 2022-09-06 21:38:35 -04:00
Matthew Kennedy 9407150544
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 73abcb044d
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 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 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 720c463ffb
trigger decoder returns a result (#4206) 2022-05-28 09:01:45 -04:00
Matthew Kennedy 6f45d0fd46
Fix trigger error indicator (#4185)
* test and fix

* more shards!
2022-05-19 09:43:42 -04:00
Matthew Kennedy 170d574a5d
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 d4509cab8a
TriggerState -> TriggerDecoder (#4157) 2022-05-10 11:41:39 +03:00
Matthew Kennedy 7e0f2d8337
switch back to flag (#4155) 2022-05-10 07:52:29 +03:00
Matthew Kennedy 7f5672aaec
encapsulate stuff properly (#4154) 2022-05-09 15:46:36 -04:00
rusefillc 32d46d1f09 synchronized Phase handling improvements fix #4099 2022-05-09 04:36:03 -04:00
rusefillc bd8459875d refactoring: bringing method names up to date 2022-05-08 09:04:27 -04:00
rusefillc bd9639b91d Remove value copy from controller into outputChannels #4095 2022-05-08 08:50:27 -04:00
rusefillc b1de262520 toothed previous time #4019 2022-03-21 20:41:09 -04:00
Matthew Kennedy b3de217c1b
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 4981eb43d0
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 95ad75318d
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 25134644e6 live data this 2021-12-09 22:02:47 -05:00
Matthew Kennedy 9a28e8d938
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 cc95bd6c8e
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 8cdac4cac0
remove engine pointer passing (#3556)
* some

* more

* more

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

* s
2021-11-15 12:44:40 +01:00