Commit Graph

131 Commits

Author SHA1 Message Date
Matthew Kennedy a2e1a079b8 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
rusefillc 1ce5be5629 m_hasSynchronizedSymmetrical handling improvements #4099 (#4101) 2022-04-23 19:45:29 -04:00
rusefillc 9ae96ea7e5 refactoring: method rename 2022-04-02 21:01:29 -04:00
Matthew Kennedy f0013f71b5 limp mangaer handles more stuff (#3983) 2022-03-20 09:28:17 -04:00
Benas Brazdziunas dbcc165a11 Launch fuel and spark cut issue (#3988)
* Launch fual and spark cut issue

* moved launch cuts to limp_manager

* Applied recomendations

* Auto-generated configs and docs

* Added recomendations

* Auto-generated configs and docs

Co-authored-by: GitHub build-firmware Action <action@github.com>
Co-authored-by: Benas <bbrazdziunas@gavea.co.uk>
2022-03-11 09:27:42 -05:00
Matthew Kennedy b07127614b decouple TPS accel enrichment from trigger (#3825)
* move call site

* move thresholding out of fast path

* adjust config

* test
2022-01-23 15:31:39 -05:00
Andrey e94b251e33 Good news RPM is now float
open question if I've affected performance negativelly or not.
2022-01-21 00:56:13 -05:00
Andrey 4e676e1a86 fixing NOISY_RPM handling via Sensor framework 2022-01-21 00:21:45 -05:00
Andrey 5f3324cd6b migrating to SensorType::Rpm API 2022-01-20 23:32:59 -05:00
rusefillc 9b38a7d445 limp ClearReason 2022-01-08 22:13:20 -05:00
Matthew Kennedy 265f005239 hook up fuel trims (#3715)
* hook up fuel trims

* pass all the params

* store per-cylinder fuel mass directly

* main trigger callback only touches per-cylinder, no banks!

* test test test test

* move UI to happy land

* changelog
2022-01-01 02:19:59 -05: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 513187decc 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 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 77361a19b2 MAP phase sensing #3544 2021-12-16 21:11:29 -05:00
Matthew Kennedy bdf6583306 smarter priming logic (#3674)
* ignition controller detects rising edge on voltage

* update test

* comment

* ignore negative transients

* tweak

* test

* priming happens on ignition-on

* priming has its own scheduling

* config & UI

* dead config

* implementation

* look, the test caught a bug

* keep the watchdog happy

* bad merge

* changelog

* easier to read the test

* test naming
2021-12-08 16:20:19 -05:00
Matthew Kennedy e80654511d prime upon ignition voltage, not on power on (#3662)
* ignition controller detects rising edge on voltage

* update test

* comment

* ignore negative transients

* tweak

* test

* priming happens on ignition-on

* priming has its own scheduling

* test

* dead adjacent line of code
2021-12-08 07:26:49 -05:00
Matthew Kennedy aa8584d89a calculate per-cylinder ignition timing (#3652)
* simplify cylinder phasing

* per cylinder timing

* s

* s

* s

* why was there a divide by 2?
2021-12-06 21:19:37 -05:00
Andrey 7fa2fa5707 MAP phase sensing #3544 2021-11-24 23:06:52 -05:00
Matthew Kennedy 9bd8a19564 oh my god we've had no asserts (#3595) 2021-11-22 17:52:03 -05:00
Matthew Kennedy e7956a53f6 fuel pump doesn't use fsio (#3576)
* fuel pump

* s

* call correct callback

* more dead

* test adjustment

* don't overflow

* don't need separate function

* java

* give it a name

* generated

* generated

* add to generate script

* import *

* this is so cheap we don't need a flag
2021-11-19 22:23:12 -05:00
Scott Smith aba4e5167e Separate out scheduleOrQueue into it's own standalone scheduler. (#3573)
It's a large enough entity that it shouldn't be buried in ignition logic.
2021-11-18 14:27:21 -05:00
Scott Smith b3e0b28c75 Make the module API more concise. (#3571)
engineModules.get<FOO>(). becomes modules<FOO>()->

I believe the new API is more conducive to supporting arrays, by doing std::array<T, N> or
std::array<Mockable<T>, N>, with the support of a helper class.
2021-11-17 21:50:00 -05:00
Scott Smith 659cc68be1 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 f9f13f0bad Create a base class EngineModule for that contains various useful callbacks. (#3548)
* Create a base class EngineModule for that contains various useful callbacks.

This cleans up the API by not requiring the notifiers to know about who wants callbacks.  The only
place you need to update to add a module is in one place.

* Add mockability.

* Convert InjectorModel to a Mockable EngineModule
2021-11-17 20:13:19 +03:00
Scott Smith 80091498a6 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 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
Scott Smith 2cfc4af998 Start the process of using a global engine ptr for unit tests. (#3551)
* Start the process of using a global engine ptr for unit tests.

Passing around the engine, config, and persistent state wasn't buying anything.  Instead, use
EngineTestHelper(Base) to correctly set and clear the global variables.  Add a dummy check in
case some test tries to set them manually.

* Fix OSX build

* Adapt PR to recently added code.
2021-11-16 00:23:14 -05:00
Andrey 7b790d36f6 random refactoring: trigger central encapsulation 2021-11-15 20:22:05 -05:00
Andrey 4bc9343d0b refactoring launch 2021-11-15 20:09:03 -05:00
Andrey 837cdf2cfb refactoring launch 2021-11-15 19:55:04 -05:00
Andrey bc3befd0ac refactoring launch 2021-11-15 18:57:12 -05:00
Andrey bafd5e0e17 refactoring launch 2021-11-15 14:40:35 -05:00
Matthew Kennedy bd04dc8352 less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
Andrey 1aca049c47 Something something Automatic Compression Release #3442 2021-11-11 20:16:46 -05:00
Andrey 7d3d93d469 dead line 2021-11-11 20:16:46 -05:00
rusefillc 504bd78814 Remove engine load acceleration enrichment fix #3357 2021-10-16 21:24:05 -04:00
Matthew Kennedy dab377d15d getOrZero (#3319) 2021-10-05 19:59:07 -04:00
rusefillc bbcb82bf0f Complete fuel cut, maybe by wall wetting? Warning on decel (?) CUSTOM_OBD_SKIPPED_FUEL = 9010 fix #3225 2021-09-27 22:04:03 -04:00
rusefillc d2fd61ac9a "Injector Duty cycle cut" 2021-09-26 20:59:32 -04:00
Matthew Kennedy 48da721c49 dead knock code (#3255)
* more unification

* hip stub

* comment

* guard

* channel idx

* include

* hip

* move in to engine

* hip9011

* dead stuff

* dead

* fsio

* lcd

* more dead
2021-09-21 20:40:20 -04:00
Matthew Kennedy d3ec2b21d1 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 6ba3c0bace dead (#3016) 2021-07-23 08:31:23 -04:00
rusefillc 9570458aea NB2 trigger shape does not seem to match JimStim #2980 2021-07-17 16:12:54 -04:00
Matthew Kennedy e3849b95d5 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 47f285c50c FATAL on NB2 tune jim stim input signal #2965 2021-07-14 16:03:00 -04:00
Andrey 263bdb7eae global static not good, there shall be only one god object /s 2021-06-23 06:10:27 -04:00
Matthew Kennedy ae668edf2a Fix multi bank fueling (#2661)
* add cylinder number

* changelog

* wording
2021-05-09 09:37:07 -04:00
Matthew Kennedy d7f9d42e07 Hook up multi bank fuel trim (#2532)
* multi bank trim

* cleaning

* output channels

* output channels
2021-05-08 17:41:50 -04:00