* require ignition on for firing
* too much havoc for a unit test
* patch up references
* last one
* fix changelog mangling
* fix the changelog template too
* bad merge
* fix the template again
* s
* fake battery voltage on hw ci
* ugh merge
* ugh merge
* schedule ignition charge by angle
* same mistake as #4536
* s
* wrap sparkAngle too
* AngleBasedEventNew
* function moved
* implement scheduleOrQueue
* prints
* Do lightweight checks first
* Dead getTimeIgnitionSeconds()
Dead since 81fffe87b7
* Get rid of efitime_t.
Purpose are not clear. Use efitick_t where ticks are used,
use efitimeus_t for uS, use efitimems_t or efitimems64_t for mS.
* Fix unit tests
* Fix misc: stm32f1_test_project
* trigger decoder returns a result
* TriggerFormDetails
* s
* don't reach out and touch the engine
* injection doesn't care about teeth
* fix up existing tests
* oh look, we can actually test this logic now without trying to depend on trigger shape!!!
* fix a real bug
* simplify
* 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
* 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
* limp manager handles engine stop
* use timer
* dead relevant fsio
* this stuff needs its own ticket
* if we can comment out 'business logic' and tests do not fail it's not a great sign :(
Co-authored-by: Matthew Kennedy <matthewkennedy@outlook.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
* unused things
* !!! actual bug !!!
* dead
* unused
* unused
* multi-bus lua RX was just broken
* make the compiler angry about it
* dead config
* alphax 2
* just call, no store
* compiler too angry
* 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
* 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
* 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
* 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
* 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
* data
* stub test
* use getTimeSinceSyncPoint
* s
* s
* no
* test
* stray ;
* those were 1/10 what they were supposed to be
* actually check something
* dead log line?
* Basic framework for high pressure fuel pump control
* Many changes
Move calculations to fast callback
Move main object into Engine
Respond to pin changes without requiring a reboot
* Use EngineModule for HpfpController
Schedule pin off after executing pin on so we are sure it ends, even if the motor stops.
Test scheduling.
Less RAM use by only having one event and reordering fields.
* Make scheduling test actually useful - need non-0 activation angle.
Co-authored-by: rusefillc <48498823+rusefillc@users.noreply.github.com>
* 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
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.
* static functions with (void)
* more
* Revert "more"
This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.
* s
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
Memory seems more valuable than CPU; use the O(lg n) lookup by angle. A side effect is that it
seems to fix trigger lookup for the second phase of TRIGGERTYPE 53 544 TT_TRI _TACH 0.00
* cancel event
* looks like it works...
* some tests are happy
* add enable bit
* undo test changes
* Revert "add enable bit"
This reverts commit 000afadd3fc560867302557afe26f76cd9fc4ed6.
* enable bit in engine
* only turn off for one test
* Revert "undo test changes"
This reverts commit 106db49e291b5a531a94de6ac177c6584d5337f6.
* more unification
* hip stub
* comment
* guard
* channel idx
* include
* hip
* move in to engine
* hip9011
* dead stuff
* dead
* fsio
* lcd
* more dead
* 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>
* update test framework
* eh
* hey look it's fewer warnings
* unwind
* fix
* config
* configs
* logic
* even java had some
* no need to be a typedef
* paste in actual cylinder count
* min oil pressure for crank
* do it time-based
* rename field
* include
* fix existing test
* tests
* fix logic
* more test
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* tle6240: fix Matt's trap
* map: report some default value if no map sensor configured
Othervise user will get "unexpected MAP value" warning
Thread 2 hit Breakpoint 1, validateMap (mapKPa=3121.66162) at ./controllers/sensors/map.cpp:126
126 if (cisnan(mapKPa) || mapKPa < CONFIG(mapErrorDetectionTooLow) || mapKPa > CONFIG(mapErrorDetectionTooHigh)) {
(gdb) bt
0 validateMap (mapKPa=3121.66162) at ./controllers/sensors/map.cpp:126
1 0x002717dc in getMap () at ./controllers/engine_cycle/map_averaging.cpp:334
2 0x0028175a in GetMapWrapper::getMap (this=0x2004214c <mapWrapper>) at ./init/sensor/init_map.cpp:12
3 0x0028177c in operator() (__closure=0x0) at ./init/sensor/init_map.cpp:20
4 0x002817a8 in _FUN () at ./init/sensor/init_map.cpp:21
5 0x002811de in FunctionPointerSensor::get (this=0x20042150 <mapSensor>) at ./controllers/sensors/function_pointer_sensor.h:24
6 0x002651c0 in SensorRegistryEntry::get (this=0x2003ddf0 <s_sensorRegistry+48>) at ./controllers/sensors/sensor.cpp:111
7 0x002653e2 in Sensor::get (type=SensorType::Map) at ./controllers/sensors/sensor.cpp:208
8 0x00261f38 in updateTunerStudioState (tsOutputChannels=0x2003d2e8 <tsOutputChannels>) at ./console/status_loop.cpp:637
9 0x00262e48 in prepareTunerStudioOutputs () at ./console/status_loop.cpp:900
10 0x00260914 in TunerStudio::cmdOutputChannels (this=0x20021a64 <tsInstance>, tsChannel=0x2003d4dc <usbChannel>, offset=0, count=340) at ./console/binary/tunerstudio_commands.cpp:24
11 0x00260584 in TunerStudioBase::handleCrcCommand (this=0x20021a64 <tsInstance>, tsChannel=0x2003d4dc <usbChannel>, data=0x2003d4e1 <usbChannel+5> "", incomingPacketSize=5)
at ./console/binary/tunerstudio.cpp:701
12 0x0025fb3c in tsProcessOne (tsChannel=0x2003d4dc <usbChannel>) at ./console/binary/tunerstudio.cpp:537
13 0x0025fbe2 in TunerstudioThread::ThreadTask (this=0x2003d608 <usbConsole>) at ./console/binary/tunerstudio.cpp:554
14 0x0025f094 in ThreadController<1200>::StaticThreadTaskAdapter (thread=0x2003d608 <usbConsole>) at ./controllers/system/thread_controller.h:37
15 0x0020035e in _port_thread_start () at ChibiOS/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S:201
* 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
* start cleaning
* disabled feature means don't print that it's disabled
* cli
* usages
* printMsg -> scheduleMsg
* this is alllll dead now
* no crlf please
* all hope is lost if you manage to hit this line
* tests
* tests
* ok we did actually need that part
* sim
* d
* kinetis
* it did ifdef, not if
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* hip9011: move hipCs out of EnginePins to hip9011 driver
* hip9011: cleanup debug output, save few RAM bytes
* Supress few signed vs unsigned warnings
* injector model, test
* new math
* inject fuel based on new math
* tests
* fix
* it should work like this
* format
* update TPS AE even when we're cutting fuel
* comment
* conversion factor
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>