Commit Graph

20 Commits

Author SHA1 Message Date
Matthew Kennedy a50fdf34d4 avoid UB in tests 2024-03-23 07:54:27 -04:00
Matthew Kennedy e718489774 Actually separate injector model for second stage 2024-01-17 08:46:21 -05:00
rusefi 415b3d55df Technical debt: ENUM_32_BITS #3874
poking the bear
2023-06-01 01:45:53 -04:00
Matthew Kennedy a19baddd47 support abs+gauge+diff fuel pressure #32
(cherry picked from commit cb0e81b062)
2023-04-30 00:20:11 -04:00
Matthew Kennedy 24650f6460
implement "ford mode" injector correction (#4686)
* implement "ford mode"

* missed the enum value
2022-10-20 22:25:39 -04:00
Matthew Kennedy 38213bbc00
more missing autoscale (#4112)
* autoscale m_config->timeConstant

* min/max afr

* more

* dwell voltage

* closed loop fuel

* knock

* map estimate

* applyNonlinearBelowPulse

* fix

* add a test while we're at it for un-covered code

* test fallback MAP since we touched that

* always compute fallback MAP even if sensor is OK
2022-04-28 08:16:02 -04:00
rusefillc b337fed520 live data 2021-12-26 13:00:17 -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
Matthew Kennedy 145316c497
less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
Matthew Kennedy 29ec0a5859
better pch usage and gmock constructors (#3426)
* break out mock constructors

* comment and spacing

* unnecessary compiler options

* happy stepper

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-10-30 20:31:09 -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 f6095b8339
fix nonlinear correction threshold (#3060)
* s

* macro

* test has to do the inverse
2021-07-25 20:42:26 -04:00
Matthew Kennedy d10ba3ddfa
injector nonlinearity (#2916)
* nonlinear polynomial

* make existing tests work again

* test that nonlinearity is called

* s

* fix enum

* ui

* fix and test

* comment

* changeloggy
2021-07-07 23:46:44 -04:00
Matthew Kennedy 2328c1be6b
Fuel pressure sensor checks (#2449)
* test for missing sensor

* test negative pressure delta checking logic

* test new hasSensor logic
2021-03-12 23:32:41 -05:00
rusefillc 16b8fb64ca vBatt -> SensorType::vBatt fix #2260 2021-03-11 23:07:18 -05:00
Matthew Kennedy 92ea09b0a6
switch more map to read from sensor model (#2162)
* hook up map

* check for init

* switch some consumers

* that's the rest of them

* test

* tests

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-02 19:13:10 -05:00
Matthew Kennedy 02c4d630f6
compensate injector flow based on fuel pressure (#1931)
* injector compensation

* fix

* ui

* testability & comments

* hella testing

* debug channels

* enum value

* auto generated enums

* update comment

* oops too much

* update config fields

* handle failed pressure sensor

* build

* fix

* add some todos for the future

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-11-10 23:11:22 -05:00
Matthew Kennedy 5929164fb3
Add injector model class (#1687)
* stub injector model

* tests

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-08-17 05:22:25 -04:00