Commit Graph

162 Commits

Author SHA1 Message Date
rusefillc 2e50dfe7cc bosch quick start decoding issue or else #6281
camSimulatorPin part two
2024-03-26 23:24:31 -04:00
rusefillc d96168cfff only: docs 2024-01-15 19:57:06 -05:00
Andrey 6ec38dad0c only: trigger refactoring reducing code duplication 2024-01-15 18:41:36 -05:00
Andrey 132d9bc809 only: trigger refactoring reducing code duplication 2024-01-15 17:54:30 -05:00
Andrey c15aa75922 only: trigger refactoring reducing code duplication 2024-01-15 17:51:22 -05:00
Andrey 1be5151e2b only:Lamborghini Diablo 1995 CKP Pattern #5876 2024-01-15 16:39:00 -05:00
Andreika 84f7508701
Trigger emulator: support for cam/vvt (#5642)
* tiny refactoring

* add cam/vvt support to trigger_emulator

* fix

* fix unit-tests

* fix

* CAM sensor simulator #5640
only: assertHappyTrigger

* fix?

* better fix?

* only:alphax-8chan

* progress!

---------

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
Co-authored-by: Andrey <rusefillc@gmail.com>
2023-11-02 21:57:01 -04:00
rusefillc bb44f565b6 only:cam/shadow 2023-11-02 15:51:25 -04:00
rusefillc b3d921d961 only:variable shadowing should be avoided #5676 2023-11-01 12:00:08 -04:00
rusefillc bcd41c0df1 only: CAM sensor simulator #5640
one step back
2023-10-26 18:17:02 -04:00
rusefillc c091270d19
T2 5 (#5650)
* fix

* add cam/vvt support to trigger_emulator

---------

Co-authored-by: andreika-git <andrei.home@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-10-26 16:06:50 -04:00
rusefillc 9c54180bf6
T2 (#5647)
* fix unit-tests

* add cam/vvt support to trigger_emulator

---------

Co-authored-by: andreika-git <andrei.home@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-10-26 14:10:51 -04:00
rusefillc 0ce7bf586b Revert "future home of quick&dirty VVT simulation only:mre_f4"
This reverts commit dfd3fde5
2023-10-25 13:04:25 -04:00
rusefillc 9fa20ad0a8 CAM sensor simulator #5640 2023-10-25 12:57:07 -04:00
Matthew Kennedy 22a10cc0eb minor pwm logic cleanup 2023-10-06 19:41:40 -04:00
Andrey c8302be4ae type clean-up to avoid nasty cast 2023-09-05 15:33:05 -04:00
rusefillc c20963d302 proteus F7 hard fault on "enable self stimulation" #5354
i feel lucky so I make random changes
2023-06-25 02:21:38 -04:00
Andrey 632912d265 extra checks 2023-06-22 14:45:55 -05:00
Matthew Kennedy f7e6ccd9e2 de-pointerize outputMode #49 2023-06-05 10:25:00 -04:00
rusefi 4d0abac889 Technical debt: ENUM_32_BITS #3874
poking the bear
2023-06-01 10:29:05 -04:00
Matthew Kennedy 71a032a61b rename triggerSimulatorFrequency -> triggerSimulatorRpm
(cherry picked from commit d1246174d2)
2023-04-30 00:44:53 -04:00
rusefi f3279c108e proteus F7 QC build is broken #5242 2023-04-19 22:09:57 -04:00
rusefi 3cf43bb0a2 proteus F7 QC build is broken #5242 2023-04-19 20:45:23 -04:00
Andrey ad634a7ddc Clean-up all the 4g drama #5213 2023-04-01 16:01:48 -04:00
Andrey dfd3fde581 future home of quick&dirty VVT simulation
only:mre_f4
2023-03-03 00:36:17 -05:00
Andrey 5949d92483 trigger emulator refactoring
only:mre_f4
2023-03-02 23:54:42 -05:00
Andrey 30a96f0b03 refactoring: better variable name
only:mre_f4
2023-03-02 23:24:59 -05:00
rusefillc 0283351d6c send more of Engine Sniffer data #4560 2022-10-29 21:55:35 -04:00
rusefillc cf75202ab6 Automation coverage for RPM not reading #4709 2022-10-28 02:44:38 -04:00
rusefillc 2677da2105 refactoring 2022-10-28 02:41:20 -04:00
rusefillc 905f59d561 progress: rpm register based on trigger input being none or not 2022-10-21 23:29:39 -04:00
Matthew Kennedy 26356adf92
also invert trigger stim if you have trigger input inverted (#4612) 2022-09-25 10:10:31 -04:00
Andrey 12d857b99c deep rabbit holes are the best ones!
refactoring: encapsulation
2022-09-14 02:06:52 -04:00
Andrey 82cda62bac inline method to reduce confusion 2022-09-14 01:34:52 -04:00
Andrey G 91d4844e38
time routines refactor (#4563)
* Extract time helpers from engine_controller_misc to efitime.cpp

* Rename currentTimeMillis() to getTimeNowMs()

We have getTimeNowNt(), getTimeNowUs(), currentTimeMillis() and getTimeNowSeconds()
Align a bit.

find . -type f -name '*.c*' -exec sed -i 's/currentTimeMillis/getTimeNowMs/g' {} \;

* Rename getTimeNowSeconds() to getTimeNowS()

To align with Nt, Us, Ms versions.

* Some comments about getTimeNowLowerNt()
2022-09-11 13:06:03 -04:00
rusefillc 851e8e48d3 refactoring: type safety 2022-09-11 02:57:35 -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
rusefillc 70e4d118ef very random progress 2022-04-16 17:04:35 -04: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
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
Matthew Kennedy 8cdac4cac0
remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -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 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
rusefillc 1493973bea very old very dead code 2021-10-20 10:38:36 -04:00
Matthew Kennedy b52d50bbf2
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 2ce7777865
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 cf2e2a6451 Nissan VVT trigger decoder #2887
that looks like one bug
2021-07-05 22:44:20 -04:00