Commit Graph

1928 Commits

Author SHA1 Message Date
rusefillc 7e690b0899 poke 2 2022-08-22 23:43:06 -04:00
rusefillc c0923f6efe poke 1 2022-08-22 23:42:48 -04:00
rusefillc 841b40d8ac RE: reasons for verbose messages 2022-08-22 22:52:48 -04:00
Matthew Kennedy aeb7c2e464
hard code vq cam gaps (#4471) 2022-08-22 19:40:24 -04:00
rusefillc b0edd12752 docs 2022-08-22 18:44:44 -04:00
Andrey a4a9a2c182 Revert "Revert "Revert "small step forward? (#4450)"""
This reverts commit 3fb0cb2516.
2022-08-21 15:23:20 -04:00
Andrey 3fb0cb2516 Revert "Revert "small step forward? (#4450)""
This reverts commit c97f86e8a7.
2022-08-21 14:43:50 -04:00
GitHub gen-configs Action c1b4e4374f Auto-generated configs and docs 2022-08-21 16:43:08 +00:00
rusefi 25778f0890 trigger gap logging: it's a mess :( 2022-08-21 12:38:29 -04:00
GitHub build-firmware Action fba78abdd5 Auto-generated configs and docs 2022-08-16 23:48:31 +00:00
Andrey c97f86e8a7 Revert "small step forward? (#4450)"
This reverts commit 10c3d5080a.
2022-08-16 19:43:46 -04:00
GitHub build-firmware Action 8c5c987b55 Auto-generated configs and docs 2022-08-16 23:06:34 +00:00
rusefillc 10c3d5080a
small step forward? (#4450)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-08-16 18:57:40 -04:00
GitHub build-firmware Action 5c131387ee Auto-generated configs and docs 2022-08-15 21:22:59 +00:00
GitHub build-firmware Action 83f2e1e7a6 Auto-generated configs and docs 2022-08-15 19:03:46 +00:00
GitHub build-firmware Action 4199384983 Auto-generated configs and docs 2022-08-15 18:43:52 +00:00
GitHub build-firmware Action 1946218699 Auto-generated configs and docs 2022-08-14 21:08:27 +00:00
GitHub build-firmware Action 8ac3ac7702 Auto-generated configs and docs 2022-08-14 20:14:30 +00:00
Matthew Kennedy 76f5832db9
resolve VVT phase using every tooth, not just sync point (#4434)
* resolve VVT phase using every tooth, not just sync point

* fix tests

* comment

* changelog
2022-08-12 08:08:23 -04:00
rusefillc f61cfcfd95 todo: huh? dead code? how can we get NAN from eventAngles table? 2022-08-11 20:05:29 -04:00
rusefillc b5c2b70e23 refactoring: better field name 2022-08-09 20:32:39 -04:00
rusefillc 122db2de95 fix Subaru EZ30 trigger gaps fix #4344 2022-07-31 10:15:16 -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
Andrey 20a16bd53b Extra gap ratios for custom trigger wheels fix #4375 2022-07-23 03:16:11 -04:00
rusefillc d92fa798ba RoverK - wow that's odd, but whatever 2022-07-12 02:42:41 -04:00
rusefillc 5fe87f091b looks dead 2022-07-12 01:38:25 -04:00
Matthew Kennedy e9d092f975
big delete ICU (#4270)
* big delete

* icu vestiges

* changelog
2022-07-07 15:27:59 -04:00
Matthew Kennedy c0f290b922
Injector scheduled by angle, not tooth index (#4208)
* trigger decoder returns a result

* TriggerFormDetails

* s

* don't reach out and touch the engine

* injection doesn't care about teeth

* fix up existing tests

* oh look, we can actually test this logic now without trying to depend on trigger shape!!!

* fix a real bug

* simplify
2022-06-24 17:43:23 -04:00
Matthew Kennedy fcd3d991ee
trigger tweaks cleanup (#4278)
* simplify some math

* we say yes to the todo

* and put back that test

* test
2022-06-23 23:11:29 -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
rusefi 271dddf61e verbose trigger sync should reuse engineSnifferRpmThreshold fix #4259 2022-06-18 15:18:45 -04:00
rusefi dacc43acad verbose trigger sync should reuse engineSnifferRpmThreshold #4259
docs
2022-06-18 14:44:21 -04:00
rusefi a552d58d42 verbose trigger sync should reuse engineSnifferRpmThreshold #4259
reducing complexity
2022-06-18 14:17:36 -04:00
rusefillc 9a9047c3f9 more info verbose trigger/vvt 2022-06-17 22:11:09 -04:00
rusefillc 6c1d2a297e more into "triggerinfo" 2022-06-17 22:10:48 -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 d5a4804993
remove dead useOnlyFirstChannel (#4211)
* This field was ignored.

* move pad out

* gone
2022-05-30 07:03:40 -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 e8be471b46
bail from trigger_central (#4210) 2022-05-29 10:42:08 -04:00
Matthew Kennedy 720c463ffb
trigger decoder returns a result (#4206) 2022-05-28 09:01:45 -04:00
Matthew Kennedy 90cc62a667
honda trigger sync ratio (#4194) 2022-05-24 17:12:36 -04:00
rusefillc e8ceaeabaf Pavel says 120 2022-05-24 14:40:54 -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 fe77f5127e
12 tooth crank mode (#4179)
* 12 tooth crank

* comment

* s

* rusefi config
2022-05-17 21:38:24 -04:00
Matthew Kennedy ae91b2aea8
don't rely on triggerStateListener to detect trigger errors (#4164)
* Write proper TriggerDecoder tests

* Improve logic around sync loss

* these tests I understand

* these I sort of understand....

* the one error in the noiseless decoder is gone!
2022-05-13 18:48:26 -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 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 5eb5b7cfbb
phase resolution rpm limit (#4156) 2022-05-10 07:22:50 +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 d5e131b1d0 m_hasSynchronizedSymmetrical handling improvements #4099
API progress
2022-05-09 04:04:38 -04:00
rusefillc 88a6b34577 helping build 2022-05-08 09:14:50 -04:00
rusefillc e3f6541e99 Merge branch 'master' of https://github.com/rusefi/rusefi 2022-05-08 09:11:16 -04:00
GitHub build-firmware Action c9560fb2dd Auto-generated configs and docs 2022-05-08 13:06:44 +00: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
GitHub build-firmware Action 04da97c1e3 Auto-generated configs and docs 2022-05-08 12:05:34 +00:00
rusefillc 84f75092ec Remove value copy from controller into outputChannels #4095 2022-05-08 07:58:19 -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 48b29d24d72331065a9f648ef5bfe845d03575d6.
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
Matthew Kennedy e4a0979dc2
Brain pin is enum class (#4108)
* change most usages to Gpio::

* board configs

* engine configs etc

* isBrainPinValid, smart gpio

* generator

* generator

* generator

* connector yamls

* kinetis enums

* cypress txt

* kinetis config

* frankenso

* config generator

* actually do it for the others

* disable skips for pr ci

* fix tle8888

* misc

* weird cast from int

* needs this operator too

* this can be an unsigned subtract

* happy tests

* s

* kinetis isConfigurationChanged weirdness

* missed J/K

* cypress efifeatures

* build script mistake (!)

* mistake in smart gpio

* debounce

* eg33

* kinetis, so needy

* it's pretty green, we can skip these again
2022-04-28 17:32:39 -04:00
Matthew Kennedy bc6a87cadc
allow enum_class in rusefi_hw_enums.h (#4104)
* make things c++ friendly

* install various canaries in coal mines

* using is much clearer than typedef

* fixing builds

* lps25

* trigger includes were a mess

* c -> c++ cleanup

* os util

* why did so many include os_util.h?

* fwd declare

* cypress/kinetis

* s

* eg33 happy

* happy sim

* cypress usb

* pch

* cypress

* doesn't need to include all that

* h7
2022-04-25 20:38:16 -04:00
GitHub build-firmware Action c8e19e807a Auto-generated configs and docs 2022-04-25 04:01:07 +00:00
GitHub build-firmware Action 8406432b29 Auto-generated configs and docs 2022-04-25 03:46:16 +00:00
rusefillc 4b8b7b1d70 docs 2022-04-24 16:17:42 -04:00
rusefillc 838e8d8ddb Remove value copy from controller into outputChannels #4095 2022-04-23 19:53:05 -04:00
rusefillc 71275e841b
m_hasSynchronizedSymmetrical handling improvements #4099 (#4101) 2022-04-23 19:45:29 -04:00
GitHub build-firmware Action 986e0573b2 Auto-generated configs and docs 2022-04-23 22:02:47 +00:00
rusefi 511954efab Remove value copy from controller into outputChannels #4095 2022-04-23 17:50:20 -04:00
GitHub build-firmware Action 82e3aa14eb Auto-generated configs and docs 2022-04-19 19:11:17 +00:00
rusefillc 13ccfefb7e https://github.com/rusefi/web_backend/issues/166 2022-04-19 14:49:57 -04:00
rusefillc 1ceabed6a5 humans need humane warning messages 2022-04-18 11:35:19 -04:00
GitHub build-firmware Action a2cff4ee12 Auto-generated configs and docs 2022-04-17 20:30:07 +00:00
rusefillc be772a6a1a random progress & method rename 2022-04-16 17:40:05 -04:00
rusefillc b9769f59cc i will confess: i need to fit a debug build into discovery 2022-04-16 17:24:31 -04:00
rusefillc 06e899e1bb very random progress 2022-04-16 17:07:57 -04:00
rusefillc 70e4d118ef very random progress 2022-04-16 17:04:35 -04:00
rusefillc 007396003e logging of live data structs was: data points #3614
unification with outputs
2022-04-14 21:01:26 -04:00
rusefillc 435ecc413c logging of live data structs was: data points #3614
unification with outputs
2022-04-14 15:46:01 -04:00
rusefillc e631988b22 Proper cam speed labels in triggers #4021 2022-04-03 12:22:47 -04:00
Andrey 204ac3961b Trigger setup in TS is highly confusing: hide operation mode from users? #4031
WOW it works?!
2022-04-03 02:30:43 -04:00
Andrey 9d335c1261 Trigger setup in TS is highly confusing: hide operation mode from users? #4031 2022-04-03 01:38:52 -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 6b5747d4c8 refactoring: method rename 2022-04-02 21:01:29 -04:00
rusefillc 086739d20a Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077 2022-04-02 19:08:22 -04:00
rusefillc 59f23e294b Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077 2022-04-02 18:32:40 -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
Matthew Kennedy 7d657106d7
warning cleanup (#4020) 2022-03-22 16:53:24 -04:00
Andrey b3fdd790b5 new VVT trigger shape? #1847 2022-03-22 06:34:22 -04:00
rusefillc b1de262520 toothed previous time #4019 2022-03-21 20:41:09 -04:00
Matthew Kennedy c7590305c4
tweak sync parameters for mitsubishi (#4017) 2022-03-21 19:23:48 -04:00
Andrey f16088f20d Mitsubishi 4B11 support #4013 2022-03-20 11:24:08 -04:00
Andrey 084a582775 Mitsubishi 3A92 Support - 3 cylinder #4011 2022-03-19 22:24:50 -04:00
Andrey 625af513fb Mitsubishi 3A92 Support - 3 cylinder #4011 2022-03-19 22:11:51 -04:00
Andrey 402f36aad6 Mitsubishi 3A92 Support - 3 cylinder #4011 2022-03-19 22:06:19 -04:00
Andrey 921aed3afe Mitsubishi 3A92 Support - 3 cylinder #4011 2022-03-19 21:34:25 -04:00
Andrey 21ab6a1a7b Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077 2022-03-19 20:34:51 -04:00
Andrey d72c60452a Mitsubishi 3A92 Support - 3 cylinder #4011 2022-03-19 17:57:35 -04:00
rusefillc 6fa0ce2a3a Mitsubishi 6G75 Support #4014 2022-03-19 16:34:40 -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 30c48389c7 sporadic HighRevTest testV12 #3806
let's attempt to guess his intentions
2022-01-25 17:24:38 -05:00
rusefillc aef0995871 sporadic HighRevTest testV12 #3806
is this bug here?
2022-01-25 10:28:35 -05:00
Matthew Kennedy 4e639480ff
fix (#3833) 2022-01-24 18:15:18 -05:00
Andrey 26c2d76f6c migrating to SensorType::Rpm API 2022-01-20 23:36:09 -05:00
Andrey cda2b711cf migrating to SensorType::Rpm API 2022-01-20 23:32:59 -05:00
rusefillc e464dd4a52 Bosch Quick Start on B6 Passat is confused about phase #3812 2022-01-19 20:55:50 -05:00
rusefillc 3898f0ce7d Bosch Quick Start on B6 Passat is confused about phase #3812 2022-01-19 16:42:05 -05:00
rusefillc 890d7769a0 Bosch Quick Start on B6 Passat is confused about phase #3812 2022-01-19 16:42:05 -05:00
rusefillc 21c2a2f7a9 Bosch Quick Start on B6 Passat is confused about phase #3812
running engine proved VVT_BOSCH_QUICK_START to match VVT_SECOND_HALF thus hard-coding phase choice
2022-01-19 01:30:16 -05:00
rusefillc 046f26508a Bosch Quick Start on B6 Passat is confused about phase #3812
OMG :( we were totally not using VVT info of VVT_BOSCH_QUICK_START and VVT_NISSAN_MR and etc etc
2022-01-19 00:48:39 -05:00
rusefillc 577b9ccb06 refactoring: reusing existing flag instead of switch which refers to same thing 2022-01-19 00:48:39 -05:00
Andrey 9f5188bf30 Better handling of RPM during stop of cranking #3803 2022-01-17 21:27:10 -05:00
Andrey a1374062f0 Better handling of RPM during stop of cranking #3803
reuse existing magic constant
2022-01-17 21:18:43 -05:00
rusefillc bc66096574 Better handling of RPM during stop of cranking #3803
refactoring: reusing existing method
2022-01-17 21:00:49 -05:00
rusefillc d9175696a2 mk files refactoring 2022-01-06 21:40:48 -05:00
GitHub build-firmware Action 2208947bb3 Auto-generated configs and docs 2022-01-05 06:49:51 +00:00
GitHub build-firmware Action 38b17f5859 Auto-generated configs and docs 2022-01-05 05:09:04 +00:00
Matthew Kennedy 0932fcf94c
Improve NA/NB miata sync parameters (#3730)
* NA sync parameters

* NB vvt pattern too

* zach's car says tighten the gap

* look at that, we sync one cycle sooner!
2022-01-01 21:39:04 -05:00
Matthew Kennedy d5c4b79b1a
Nb2 crank sync special case (#3727)
* extract isSyncPoint

* test because why not

* check vvt resync nb2

* custom nb decoder

* test only resyncs once!

* good job valgrind, you found a bug!
2021-12-31 15:47:25 -05: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
rusefillc 860f2f96f9 docs 2021-12-29 16:18:21 -05:00
Matthew Kennedy c3b712aa3b
remove vvtSyncTimeNt (#3722)
* 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

* check synchronized bit

* now we don't need it at all?!

* and *NOT* synced

* start VVT sync earlier
2021-12-28 00:00:26 -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 4292c2fb1d MAP phase sensing fix #3544
removing dead implementation
2021-12-16 21:28:27 -05:00
rusefillc 06ccf524dd MAP phase sensing #3544
removing dead implementation
2021-12-16 21:13:55 -05:00
Matthew Kennedy 256df56fa7
Honda K 12+1 decoder adjustment (#3694)
* adjust trigger

* real cranking

* mk
2021-12-14 21:10:01 -05:00
Matthew Kennedy 7e3765650f
adjust mr18 vvt trigger (#3691)
* adjust mr18 trigger

* second gap, why not
2021-12-13 16:33:34 -04:00
Andrey 099f7d5a86 MAP phase sensing #3544
limiting to below cranking RPM limit
2021-12-11 02:56:19 -05:00
Matthew Kennedy 6de8364895
maybe more working MAP sampling (#3689)
* what if we do this

* cleanup

* s

* test
2021-12-11 03:01:28 -04:00
rusefillc 17879ef7de MAP phase sensing #3544 2021-12-09 22:16:42 -05:00
rusefillc 25134644e6 live data this 2021-12-09 22:02:47 -05:00
rusefillc f44370a5b8 MAP phase sensing #3544
gauge name fix
2021-12-08 12:44:43 -05:00
Andrey 3a00fc4767 MAP phase sensing #3544
new implementation seems complete? 360 fix
2021-12-07 21:37:33 -05:00
Andrey 50038167d8 MAP phase sensing #3544
new implementation seems complete?
2021-12-07 21:08:25 -05:00
Andrey 940b04ab24 Let's always have TS structure so that unit tests can check values in outputChannels, kind of making outputChannels a god dump for state but whatever since Live View is coming 2021-12-07 20:18:47 -05:00
Andrey e72d57438a MAP phase sensing #3544
new implementation
2021-12-07 20:00:04 -05:00
Andrey 6e49d66385 MAP phase sensing #3544
look new unit test!
2021-12-07 16:58:10 -05:00
rusefillc f826fe13aa MAP phase sensing #3544
trigger sync better gauges/logging
2021-12-06 17:04:05 -05:00
rusefillc 934b005acb trigger sync better gauges/logging 2021-12-06 13:08:41 -05:00
rusefillc 2f45ed205c MAP phase sensing #3544
option to look for high and low peaks
2021-12-05 14:25:26 -05:00
rusefillc 85da6d6ad1 MAP phase sensing #3544 2021-12-04 18:47:14 -05:00
rusefillc 0c91e77749 MAP phase sensing #3544
taking a step back to happy place
2021-12-04 18:21:10 -05:00
rusefillc 45a95db67f MAP phase sensing #3544
trying longer average
2021-12-04 17:06:59 -05:00
Matthew Kennedy 25beb610b0
log actual tooth angle (#3646) 2021-12-02 19:22:33 -05:00
rusefillc fda7a3a775 Engine phase wrap around in log #3645
refactoring & docs
2021-12-02 17:06:20 -05:00
rusefillc e896afe2f6 Engine phase wrap around in log #3645
refactoring & docs
2021-12-02 17:06:20 -05:00
rusefillc 168a899ba9 how many more spelling mistakes?! 2021-12-02 01:06:40 -05:00
GitHub build-firmware Action 36fb3c195d Auto-generated configs and docs 2021-12-01 00:36:32 +00:00
Matthew Kennedy 890cbd8cf2
remove define_constructor (#3640)
* no define_constructor

* jar

* sim needs live doc
2021-11-30 19:31:54 -05:00
rusefillc 5c0795f034 random note 2021-11-26 15:48:42 -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
Andrey e2fa1af527 MAP phase sensing #3544 2021-11-24 22:36:36 -05:00
Andrey c2fa1cea78 minor progress 2021-11-24 22:35:56 -05:00
Matthew Kennedy 3334a6963c
oh my god we've had no asserts (#3595) 2021-11-22 17:52:03 -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
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
Matthew Kennedy bb57a4b084
detect more overflows with asan (#3582)
* overflow detector

* type list dynamic allocate

* fix the buffer length

* comment

* pr fb

* sanitize sim

* fix sim sanitizer bug

* didn't mean to turn off optimization for sim

* asan can do that, if you turn it on!

* cleaning
2021-11-20 01:38:39 -05:00
rusefillc ecac07f938 brave refactoring 2021-11-19 23:56:52 -05:00
Matthew Kennedy 692e3d7e9f
adjust miata sync conditions (#3577) 2021-11-19 02:30:05 -05:00
Scott Smith 69d36dad6e
Final cleanup of ENGINE macros (#3567)
Fix some uses of ENGINE() not detected by regex due to parenthesis.
Remove now empty engine_ptr.h
Don't worry about EFI_* not being defined, the compiler defaults to 0 if they aren't.
2021-11-17 13:45:10 -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
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
Andrey 655b77dc3f random refactoring: trigger central encapsulation 2021-11-15 20:22:05 -05:00
Matthew Kennedy cb032fb1ea
(void) -> () (#3550)
* static functions with (void)

* more

* Revert "more"

This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-15 13:02:34 +01:00
Matthew Kennedy 145316c497
less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
rusefillc 0813266ee1 trigger refactoring & docs 2021-11-14 15:35:11 -05:00
Matthew Kennedy a7ba539e70
math is fun (#3545)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-14 15:32:35 -05:00
rusefi e8aebc313a Something something Automatic Compression Release #3442 2021-11-14 15:04:10 -05:00
rusefillc a9bcce88d0 script settings need names! 2021-11-13 22:47:46 -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 5de6c2a270 typo 2021-11-07 01:51:05 -05:00
rusefillc 20784db801 refactoring - magic constant bad
cypress and kinetis both have this macro already
2021-11-07 01:34:16 -04:00
rusefillc 0af09f596c refactoring - magic constant bad
cypress and kinetis both have this macro already
2021-11-07 01:28:28 -04:00
rusefillc 6d0dfe4542 refactoring - magic constant bad 2021-11-07 00:09:17 -04:00
rusefillc 656b8c3429 refactoring - magic constant bad 2021-11-07 00:03:16 -04:00
Matthew Kennedy 7590e4c679
log current engine phase on trigger teeth (#3471)
* log phase on trigger teeth

* ui

* guard
2021-11-05 20:02:15 -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
Matthew Kennedy 59e9d05fc7
extract engine phase function (#3456)
* extract getCurrentEnginePhase

* inject engine ref

* never invalid RPM, use 0 instead

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-04 05:46:16 -04:00
Andrey 61777564d4 Honda K cam wheels #3405 2021-10-30 21:09:58 -04:00
rusefillc c62fedbe34 Override trigger gaps feature #2734 2021-10-30 10:45:32 -04:00
Andrey a6a969390f Honda K cam wheels #3405 2021-10-28 19:26:59 -04:00
Andrey fbd37ae0e7 dead magic macro 2021-10-28 19:18:50 -04:00
rusefi f0f4513998 VVT to be reported after primary 2021-10-28 16:46:54 -04:00
Andrey 463515e282 Honda K cam wheels #3405 2021-10-28 13:49:54 -04:00
Andrey de350131e6 Honda K cam wheels #3405 2021-10-28 11:40:31 -04:00
Andrey c96e52d6f3 Honda K cam wheels #3405 2021-10-28 10:36:41 -04:00
Andrey b5ae711e2f refactoring: extracting method to improve readability 2021-10-28 10:30:05 -04:00
Andrey 484d078752 Honda K cam wheels #3405 2021-10-26 22:47:19 -04:00
rusefi 30f9c57f70 Honda K cam wheels #3405 2021-10-26 17:29:26 -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 8a3f93d6f6 progress 2021-10-24 15:30:17 -04:00
GitHub build-firmware Action 013cd08b35 Auto-generated configs and docs 2021-10-23 23:05:27 +00:00
rusefi 274a6d8ba6 triggerinfo progress 2021-10-23 19:01:31 -04:00
rusefillc eb05f4594e very old very dead code 2021-10-20 12:57:07 -04:00
rusefillc 1493973bea very old very dead code 2021-10-20 10:38:36 -04:00
GitHub build-firmware Action 981fc58297 Auto-generated configs and docs 2021-10-17 01:13:47 +00:00
rusefillc 292173f818 progress - live doc generator works again! 2021-10-16 21:08:50 -04:00
rusefillc 4cc1c352c2 better file locations 2021-10-16 20:17:01 -04:00
rusefillc ea87d9c9be Whatever we call it, no matter how we do it - we need live data / remote view into rusEFI actual state #3353
dead code
2021-10-14 15:17:09 -04:00
rusefillc 8a2472126a https://rusefi.com/forum/viewtopic.php?f=5&t=2143 Suzuki G13B tooth pattern 2021-10-04 19:59:51 -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
rusefillc 308a798eaa Nick has RPM spikes and engine hiccups #3269 2021-10-03 01:48:34 -04:00
rusefillc 58cd414c0a miata NB1 is a weird half-VR/half-Hall sensor 2021-09-29 14:31:36 -04:00
Matthew Kennedy 35e1a7cc0c
fix (#3253) 2021-09-21 00:27:14 -04:00
rusefillc 7fc88fa304 https://rusefi.com/forum/viewtopic.php?f=5&t=2117 2021-09-12 13:58:03 -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
rusefi 48c516f9f7 https://rusefi.com/forum/viewtopic.php?f=5&t=2117
Ford TFI PIP
2021-09-11 23:16:22 -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
Andrey G 39664d98a0
Subaru svx trigger update (not vvt) (#3210)
* trigger: subaru: SVX: some comments

* trigger: subaru: svx: fix crank 2 offset

* trigger: subaru: svx: rework a bit

* trigger: subaru: svx: fix dtc position
2021-09-04 11:42:12 -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 6ea76921f4 docs 2021-08-31 04:27:31 -04:00
rusefillc 3d4ff9083b Pavel says there are issues 2021-08-11 04:16:51 -04:00
Andrey 08dff4ceb6 Nissan 4 cylinder QR trigger wheel #3118 2021-08-08 06:16:19 -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
rusefillc c1275af29c reduce chance of invalid CAM setting fix #3105 2021-08-03 22:15:40 -04:00
Matthew Kennedy 25414ebdad
yet more pch (#3068)
* big pch energy

* put back ramdisk stub

* tests are happy

* h743 nucleo

* kinetis

* I love deleting code!

* make stepper happy

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-08-03 22:05:01 -04:00
Matthew Kennedy 0d983855b9
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