Commit Graph

96 Commits

Author SHA1 Message Date
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 14e37e3cf4 FasterEngineSpinUp should be enabled by default fix #4094 2022-04-23 09:51:47 -04:00
Andrey cc9a1136c4 Trigger setup in TS is highly confusing: hide operation mode from users? #4031 2022-04-03 02:21:37 -04:00
Andrey 5840a61f55 Trigger setup in TS is highly confusing: hide operation mode from users? #4031 2022-04-03 01:02:13 -04:00
Andrey 95d36b37e3 Trigger setup in TS is highly confusing: hide operation mode from users? #4031 2022-04-03 00:34:18 -04:00
rusefillc 6b5747d4c8 refactoring: method rename 2022-04-02 21:01:29 -04:00
Matthew Kennedy 5811f691d9
things are happy without gtest (#3999)
* things are happy without gtest

* this is not a static lib
2022-03-14 15:00:02 -04:00
Matthew Kennedy d8073e8b27
remove mock adc (#3888)
* remove mock adc

* do these do /anything/?
2022-02-03 20:43:34 -05:00
Matthew Kennedy 10be2d5f40
Remove FSIO, byeeeeeeeee (#3865)
* vestigial config

* replace last functionality

* engine/board configs include

* files that didn't need to include this

* remove FSIO implementation

* stragglers

* random little bits

* s

* s

* ConfigDefinition

* jar

* s
2022-02-02 02:03:31 -05:00
Matthew Kennedy 2444090933
vss based dfco (#3845)
* vss based dfco

* fix digits while we're here

* fix some other digits for fun

* don't use custom assert

* simplify test

* less than or equal, test vss behavior

* even better than comments are tooltips
2022-01-27 14:05:18 -05:00
Matthew Kennedy eb14d74846
extract logic from wall wetting AE (#3848)
* extract logic

* extract interface

* explicitly test wall fuel
2022-01-27 07:45:50 -05:00
Matthew Kennedy df1635b5a0
dfco checks driver throttle intent (#3832) 2022-01-24 14:26:39 -05:00
Andrey 9313bcca92 migrating to SensorType::Rpm API 2022-01-20 23:19:48 -05:00
Andrey e37ab73f1d migrating to SensorType::Rpm API 2022-01-20 22:58:12 -05:00
Andrey 9f08db256b migrating to SensorType::Rpm API 2022-01-20 22:12:04 -05:00
Matthew Kennedy 76fdb4063e
XY Idle VE Table (#3781)
* config & ui

* implement

* test idle VE switching behavior

* use the interface where we can

* s

* re-bump flash version
2022-01-20 14:08:54 -05:00
Matthew Kennedy 338c14c3a8
cylinder ignition trim (#3709)
* cylinder ignition trim

* changelog

* changelog

* test

* move UI
2022-01-01 15:47:47 -05:00
Matthew Kennedy ab3e3ac83f
hook up fuel trims (#3715)
* 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
2022-01-01 02:19:59 -05:00
rusefillc 6665c4fb34 docs 2021-12-26 13:41:10 -05:00
rusefillc b337fed520 live data 2021-12-26 13:00:17 -05:00
Andrey 19a8685644 refactoring 2021-12-24 16:51:31 -05:00
Matthew Kennedy 0810198185
clean up timing table defaults (#3705)
* less crazy configs

* cleanup

* make that test happy
2021-12-20 08:02:38 -05:00
Andrey 76768d6ac4 2 byte table axis #3045
fixing build
2021-12-20 01:50:23 -05:00
Matthew Kennedy 4148ee76bf
smarter priming logic (#3674)
* 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
2021-12-08 16:20:19 -05:00
Matthew Kennedy 2050580a16
prime upon ignition voltage, not on power on (#3662)
* 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
2021-12-08 07:26:49 -05:00
Matthew Kennedy 3a95e86112
calculate per-cylinder ignition timing (#3652)
* simplify cylinder phasing

* per cylinder timing

* s

* s

* s

* why was there a divide by 2?
2021-12-06 21:19:37 -05:00
Scott Smith ba4a00d3bb
Drop SingleChannelStateSequence in favor of MultiChannelStateSequenceWithData (#3519)
* Drop SingleChannelStateSequence in favor of MultiChannelStateSequenceWithData

Most all the users were Multi* anyways, so just improve that:
1. Allow up to 8 waveforms to share one byte per timestamp.  It could be better but this is simple
   and gets most of the benefit.
2. Use a wrapper structure to handle reserving space for the arrays.  Makes the interface simpler
   and more rigid.  Also saves 4 bytes per Multi*.  Downside is access is now via -> and *,
   not . and (nothing).

Saves 224 bytes of BSS, 1832 bytes of RAM4/CCM, 952 bytes of TEXT, and 103 bytes of RODATA

* Instantiate a base_t to make debugging easier.
Also fixes crash on real firmware by using &m_base instead - LTO optimization issue?

* No magical templated StaticAlloc thingy.  Just virtual functions.
2021-11-21 04:56:07 -05:00
Matthew Kennedy 9a28e8d938
correctly compute engine revolution number (#3586)
* add param

* first revolution is revolution 0, not revolution 1

* would you look at that, we sync one rev quicker!

* changelog

* rpm value
2021-11-21 09:01:27 +03:00
Scott Smith 69d36dad6e
Final cleanup of ENGINE macros (#3567)
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.
2021-11-17 13:45:10 -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
Scott Smith 344c9073e2
Start the process of using a global engine ptr for unit tests. (#3551)
* 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.
2021-11-16 00:23:14 -05:00
Scott Smith 62daac73c7
Use Valgrind to detect unitialized variable references. (#3555)
* Use Valgrind to detect unitialized variable references.

Fix the edge cases that pop up

* Comment and disable Mac run
2021-11-15 23:42:23 -05:00
Matthew Kennedy 145316c497
less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
rusefillc a85d1bb064 Epic: Remove FSIO #2928 2021-11-14 07:30:26 -05:00
Scott Smith 713083baa5
Convert TriggerWaveform::wave to a pointer in preparation for code-defined sequences. (#3528)
It will eventually be class to support dynamic universal patterns in addition to ROM-based
tables.
2021-11-11 13:19:25 -05:00
Scott Smith d4c4db9a12
Move phaseCount into MultiChannelStateSequence (#3520)
We can them drop the field from a bunch of callers, simplifying the code.
2021-11-10 19:47:27 -05:00
Matthew Kennedy 980a7cc833
autoscale fields in generated structs (#3444)
* add to grammar

* parser

* parser

* example consumer

* build config tool

* commit the right jar
2021-11-02 18:59:19 -04: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
rusefillc b7601e063f generate java enum from C enum? generate both C and java from yaml? #2102 2021-10-24 11:40:47 -04:00
rusefillc 77ebc71f9a
overdwell protection #3071 (#3294) 2021-10-02 01:17:53 -04:00
Matthew Kennedy 0a550a70b1
overdwell protection (#3220)
* 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.
2021-10-02 01:10:24 -04:00
Andrey 13d21716db reducing crazy in unit tests 2021-10-02 00:13:15 -04:00
Andrey 097e871b19 reducing crazy in unit tests 2021-10-02 00:00:08 -04:00
Andrey 3da054c6e7 reducing crazy in unit tests 2021-10-01 23:53:22 -04:00
Matthew Kennedy 5ff7235040
don't "validate instant RPM" (#3095)
* don't "validate instant RPM"

* test actually tests the right thing

* test mode transition
2021-08-04 08:17:14 +03: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 b52d50bbf2
Use pch in lots of files (#3066)
* most engine.h

* most engine_configuration

* more

* more

* more

* more

* more

* moooooore

* ok I'm done for now

* oops
2021-07-26 01:05:17 -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