Commit Graph

16 Commits

Author SHA1 Message Date
rusefi 6b97f23eae pursuit of truth 2023-10-31 09:36:45 -04:00
Andrey G f25edb646d
ADC and HIP: feed callback with voltage, not raw adc values (#4939)
* hip9011: use adcToVoltsDivided() helper

* hip9011: feed callback with volts, not raw adc value
2023-01-05 12:00:23 -05:00
rusefillc 71b2dc762a https://en.wikipedia.org/wiki/Pi 2022-01-14 21:23:27 -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 145316c497
less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
Matthew Kennedy bf98546314
share some knock logic (#3246)
* knocky knock

* only if TS

* typo

* merge
2021-09-20 16:10:34 -04:00
Andrey G e18ba01fe5
hip9011 (#2658)
* hip9011: isolate debug stuff

* hip9011: renames

* hip9011: start sensing knockDetectionWindowStart degres from fire

* engine: more realistic values for knock window

* hip9011: remove magic CS toggling

* hip9011: EFI_HIP_9011_DEBUG should depend on EFI_HIP_9011
2021-05-08 18:43:55 -04:00
Andrey G 15811a6ff0
hip9011 (#2654)
* Move HIP states enum out of rusefi_enums.h

-this is internal driver stuff. No need to have it defined globaly.

* Auto-generated configs and docs
2021-05-08 10:08:18 -04:00
Andrey G afcc8848c5
hip9011 update (#2653)
* hip9011: add check for SPI reply in advanced mode

* hip9011: read value over SPI in advanced mode
2021-05-08 09:50:28 -04:00
Andrey G fa840a7593
hip9011 and friends (#2527)
* engine math: extrant getFiringOrderTable for reuse

* engine math: getNextFiringCylinderId helper

* introduce knock_logic: first member is getCylinderKnockBank()

moved from software_knock.cpp

* hip9011: support two inputs/banks

* fix CI

* Board Subaru EG33: populated with TPIC8101 with Advanced mode

* hip9011: test communication in advanced mode

* hip9011: handle situation when chip is already in advanced mode

* Board Subaru EG33: cylinder to knock bank mapping

* hip9011: count spi transactions in advansed mode too

* hip9011: reset incalid responce counter after chip initialization

* hip9011: make debug output more structured
2021-04-04 18:13:21 -04:00
Andrey G 3d138958ce
Hip9011 (#2512)
* hip9011: coexistance with other spi devices

* hip9011: rework so SPI transfer is invoked from thread

also use polling spi exchange to avoid cache problems

* hip9011: move calculations from ADC callback to thread

* hip9011: big cleanup

* hip9011: simplify spi communication

* No need to set knockBandCustom if it is not custom

HIP9011 calculates knockBand from cylinderBore same way

* hip9011: make unit test happy

* hip9011: fix unit test

* hip9011: remove duplicated initialization, reorder

* hip9011: just renames and data type adjustments

* hip9011: rename BAND() to HIP9011_BAND()

* hip9011: move some code from lookup.cpp to logic.cpp

* hip9011: move initEngineNoiseTable to engine_configuration.cpp

* hip9011: move lookup tables to hip9011_logic.c

* hip9011: remove empty files

* hip9011: additional checks
2021-03-30 10:56:25 -04:00
Andrey G bbe3291ccd
hip9011: get callback from spark on each cylinder (#2499)
* hip9011: get callback from spark on each cylinder

* hip9011: cleanup unused
2021-03-27 14:12:49 -04:00
Andrey G fbcff6f0c8
hip9011 compilation fix, cosmetic clean-ups (#2414)
* Board subaru eg33: has HIP9011 knock sensor

* hip9011: lastExecutionCount does not exist any more

* hip9011: extranc commands to header, use logic math for bitfields
2021-02-28 15:42:57 -05:00
rusefillc ff765f5f5d knock v12 2021-01-06 19:42:07 -05:00
rusefi 8f4aecf7ca The Big Refactoring of 2019: folder structure #723 2020-08-02 20:46:40 -04:00