Commit Graph

1539 Commits

Author SHA1 Message Date
Scott Smith aec887efc8 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 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
Scott Smith 5bd7d8e372 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 38ea0d1835 Revert "Don't keep a separate MultiChannelStateSequence for the trigger emulator. (#3513)"
This reverts commit 4e220dc163.
2021-11-09 20:42:23 -05:00
Scott Smith 4e220dc163 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 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
Andrey 94faa375e1 reducing complexity 2021-11-07 01:57:32 -05:00
rusefillc d0a8bbc974 typo 2021-11-07 01:51:05 -05:00
rusefillc 4f6dc57d31 refactoring - magic constant bad
cypress and kinetis both have this macro already
2021-11-07 01:34:16 -04:00
rusefillc 73fe152db2 refactoring - magic constant bad
cypress and kinetis both have this macro already
2021-11-07 01:28:28 -04:00
rusefillc 5ddd516860 refactoring - magic constant bad 2021-11-07 00:09:17 -04:00
rusefillc fd28e82f73 refactoring - magic constant bad 2021-11-07 00:03:16 -04:00
Matthew Kennedy f45d365f24 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 2c47f603fc make master happy (#3467) 2021-11-05 16:01:13 -04:00
Matthew Kennedy b41dbe2ed1 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 6b85313b04 nissan 4yl crank pattern (#3462)
* refactoring nissan trigger

* comments

* plumbing

* b
2021-11-05 07:15:03 -04:00
Matthew Kennedy cadaf2a801 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 cc0a93080f Honda K cam wheels #3405 2021-10-30 21:09:58 -04:00
rusefillc a2f1cd2467 Override trigger gaps feature #2734 2021-10-30 10:45:32 -04:00
Andrey 1685ec95cf Honda K cam wheels #3405 2021-10-28 19:26:59 -04:00
Andrey 965333e410 dead magic macro 2021-10-28 19:18:50 -04:00
rusefi 74d302ad50 VVT to be reported after primary 2021-10-28 16:46:54 -04:00
Andrey 68c1995044 Honda K cam wheels #3405 2021-10-28 13:49:54 -04:00
Andrey 94b5b3a089 Honda K cam wheels #3405 2021-10-28 11:40:31 -04:00
Andrey 5527f77589 Honda K cam wheels #3405 2021-10-28 10:36:41 -04:00
Andrey 5fcb2f75a5 refactoring: extracting method to improve readability 2021-10-28 10:30:05 -04:00
Andrey df67d76968 Honda K cam wheels #3405 2021-10-26 22:47:19 -04:00
rusefi 6c554e09f8 Honda K cam wheels #3405 2021-10-26 17:29:26 -04:00
rusefillc 996a39ba6e generate java enum from C enum? generate both C and java from yaml? #2102 2021-10-25 11:05:45 -04:00
Andrey 98fe894ce1 Honda K cam wheels #3405 2021-10-24 17:12:19 -04:00
rusefillc 61af92bb25 progress 2021-10-24 15:30:17 -04:00
GitHub build-firmware Action fbcacc4cc9 Auto-generated configs and docs 2021-10-23 23:05:27 +00:00
rusefi 4dd1ae7035 triggerinfo progress 2021-10-23 19:01:31 -04:00
rusefillc 45e0a0403f very old very dead code 2021-10-20 12:57:07 -04:00
rusefillc bee1eb2c6b very old very dead code 2021-10-20 10:38:36 -04:00
GitHub build-firmware Action 5ab712c51d Auto-generated configs and docs 2021-10-17 01:13:47 +00:00
rusefillc 86db25f94a progress - live doc generator works again! 2021-10-16 21:08:50 -04:00
rusefillc 94be3608a1 better file locations 2021-10-16 20:17:01 -04:00
rusefillc 1f1c538fc0 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 b7f6c40847 https://rusefi.com/forum/viewtopic.php?f=5&t=2143 Suzuki G13B tooth pattern 2021-10-04 19:59:51 -04:00
Andrey de5af3f4ca https://rusefi.com/forum/viewtopic.php?f=5&t=2143 Suzuki G13B tooth pattern 2021-10-04 19:29:58 -04:00
rusefillc 6350d0923a https://rusefi.com/forum/viewtopic.php?f=5&t=2143 Suzuki G13B tooth pattern 2021-10-04 11:25:27 -04:00
rusefillc fec25e0a39 Nick has RPM spikes and engine hiccups #3269 2021-10-03 01:48:34 -04:00
rusefillc c89b06fa07 miata NB1 is a weird half-VR/half-Hall sensor 2021-09-29 14:31:36 -04:00
Matthew Kennedy 085709b6ba fix (#3253) 2021-09-21 00:27:14 -04:00
rusefillc 3962c20c3f https://rusefi.com/forum/viewtopic.php?f=5&t=2117 2021-09-12 13:58:03 -04:00
Andrey 60fdcbbd99 https://rusefi.com/forum/viewtopic.php?f=5&t=2117 2021-09-12 11:56:12 -04:00
rusefi fdab33d958 https://rusefi.com/forum/viewtopic.php?f=5&t=2117
Ford TFI PIP
2021-09-11 23:42:05 -04:00
rusefi ed7bb0389b https://rusefi.com/forum/viewtopic.php?f=5&t=2117
Ford TFI PIP
2021-09-11 23:16:22 -04:00
Matthew Kennedy 98c4e71f03 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