* cli registry: rework this hell, add FFF and FFFFF
* kinetis: no nodefaultlib
* revert back token helpers
* cli_registery: argument parser: do not eat qoutes
* Unit test for FFF
* cli_registry: remove debug
* less dependence on that logger
* comma
* refactor a bit, make it clear what this thing actually *does*
* static
* shrink the buffer a bit and make names useful
* dead util that's just subtraction lol
* consumers and api
* dead test
* baro uses sensor model
* remove old (copy of?) map lookup logic
* I guess we don't need FastInterpolation any more?
* don't double init analog input
* ui & config
* bump flash version
* compaction
* s
* make things happy
* fsio too
* OK, well those defaults were insane
* b
* why are these defaults insane
* adjust cylinder offset ui
* s
* cleanup
This exposed a buffer overrun, so double the size of the buffer (to account for 720 degree engine
cycle vs 360 degree crank events).
Also use proper numeric limits when computing min/max.
Finally, add a lock around the call to cyclic_buffer that actually caused the contention.
* overflow detector
* type list dynamic allocate
* fix the buffer length
* comment
* pr fb
* sanitize sim
* fix sim sanitizer bug
* didn't mean to turn off optimization for sim
* asan can do that, if you turn it on!
* cleaning
* 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>
* delimeter is not comma
* do it in config txt
* use txt
* s
* string
* compat
* also, spelling is hard
* use new name
* use new name
* generate enough for happy console
* use an even less common character
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
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.
* 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.
* static functions with (void)
* more
* Revert "more"
This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.
* s
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
The last version is already much better than the original, mostly because it doesn't call
CriticalSectionLocker, which has a ton of overhead due to debug tracking. But this version is
another 4 instructions / 12 bytes shorter. Does as much match in 32-bit land as possible, and
avoids math operations that span 64-bits (i.e. either operate on the lower half or upper half, but
not both). The result is only 3 instructions not including the necessary 4 loads (ptr to now, now,
ptr to upper, upper), 1 store (upper), and 1 return/branch.
Disallow scaled_channel for float. I can't think of a reason to allow it, and it gets in the way
of rounding.
Add separate template param to setTable; let the compiler sort out whether assignment can happen
between TElement and VElement without forcing them to be the same at function call time.
Remove some implicit C array to pointer conversions in Map3D by adding
(), *, and & where appropriate. This allows us to remove getBinPtr.
Call interpolate3d from Map3d so there's no code duplication.
* scale map Y axis
* allow different row/col types
* scaled channel detector
* interpolation
* looks like this actually works
* tests, no manual scaling
* comment
* wiring
* static
* implementation
* comment
* unit tests happy
* guard
* guard smarter, not harder
* guard smarter not harder
* guard even smarter, not even harder
* don't need that
* 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>
* post cranking factor limits
* sensible defaults
* but not for tests
* add pointer version of get bin
* test via map3d
* put that back for a minute
* new impl
* fix order
* rename and fix table orientation
* flip the table to the correct orientation
* dead cleanup, rename
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* these start themselves now
* dead
* configure ports
* start serial
* dead
* minimal pins
* simulator logging works
* why not enable lua
* speeeeeed
* start lua
* spammy print
* helper
* use it miata
* do type safe copy
* miata vvt
* etb
* default iat correction
* magic is afoot here
* hunchback
* misc
* neon
* neon
* aspire
* citroen
* neon
* missed one
* dead
* festiva
* remove andreyism
* very dead
* no need for copy of that function
* cleanup
* finish it off
* one more logger ptr
* fwd decl
* Revert "one more logger ptr"
This reverts commit a21fb0087ddc748978d716db2710800cf26e437b.
* unused
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* minor cleanup
* enable mailboxes
* priority
* implement new logger
* more cleaning
* signature
* remove debug
* put the assertion back in
* remove debugging
* spelling
* doy
* tweaks & comments
* cleaning
* size_t
* guard more
* test build now
* needs more ram until we can remove LogginWithSTorage
* hunt for memory
* bootloader
* unused
* stub simulator
* it would help to get the signature right
* geez kinetis only has 64k ram
* more guarding because kinetis
* that's now very legal and very cool
* templatify
* s
* force null terminate
* probably fix
* const
* write a test
* disable sensor chart for now
* hide SC ui
* oh nope that breaks many things
This reverts commit c3c1bb324fb484c3d9cc44b7715c234bc0392e1e.
* missed one
* reset after scheduleLogging
* we can't print out the full message because it contains commas which break parsing
* force terminate long buffers
* let's see how much memory we have to play with
* a lot, is the answer
* real thread name
* shrink this for now before its deleted
* turn that back on
* biiig comment
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* disable sensor chart
* type signature, guards
* we can't log the message as that confuses the parser
* dead
* this syntax was technically illegal
* more
* turn it back on
* remove config
* api
* implement
* ui
* java ui
* 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>
* template table2d
* assertions
* oops
* tests
* test bins too
* more assert
* format
* explicitly handle and test NaN
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* round rpm instead of truncating
* efiround is expensive
* Revert "efiround is expensive"
This reverts commit e5690f89e1b1988aacf5ced1f024d576465a7cd6.
* round is better than rintf
* testing
* it works now?!
* comment
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* switch to CriticalSectionLocker
* that's just about all
* clean up last usage
* include hpp for sim
* need the cpp wrappers in the makefile too
* include dir
* include
* lambda
* default configs, fix build
* config, gauge, UI
* more digits
* change menu text
* fix that while I'm here
* doesn't need extra word
* todo note
* tests
* last test
* missed a config
* update java
* store target lambda
* more java
* format
* hopefully enough java for CI to pass
* add
* remove old
* remove more old
* makefile
* fix init
* patch up other stuff
* actually fix it this time
* raw output channels
* gauges, UI
* scaled channel
* fix field ordering
* remove old impl
* add cpp wrapper to os_access
* clean up os_access
* remove touchTimeCounter
* new impl
* put comment about lock free impl
* include cpp wrappers for BL
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* s
* science
* set pin mode
* turn stuff off so it fits
* filtering maybe
* filtering actually works
* generate filter parameters internally
* shorter window
* guard behind enable flag
* use checked in filter
* add biquad reset
* tracing
* const
* exec order
* do it from a thread
* smaller buffer, comment
* configure with header
* only for proteus
* oops
* unused
* not needed
* guards
* pin config
* don't need that include
* precook filter steady state
* define sample rate
* config enable switch
* improve biquad
* cleanup
* add filtering to subscriptions
* config sensors
* comment
* doesn't need to be that fast
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* configurable stoich ratio
* afr table always in gas afr
* default
* typo
* use defined ratio
* do it in config too
* missed a spot
* oops wrong one
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* add clampf
* more tests
* public
* missed a mock
* fix output duty clamping
* do it that way
* more
* ah ha!
* test negative too
* clamp pedal
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* closed loop controller base
* etb tps test
* closed loop controller tests
* test support
* update gtest
* fix for change
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* use type instead of value
* fix remaining initializer-list users
* impruv
* last consumer?
* consumer
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* aem xseries
* parens to avoid operator precedence issues
* put in cfg
* disable that too
* fix sim/unit
* enough generated for ci
* this will guard correctly