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.
Ignition callers are all tooth based, but aux valves calls it from both the microsecond timer and
the main initialization thread. HPFP will also soon call it from both those places too.
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.
* 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
* 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.
* 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.