Commit Graph

397 Commits

Author SHA1 Message Date
Andrey 603f188b55 a bit of dead code 2023-01-03 07:49:17 -05:00
Matthew Kennedy 5250b177c2
Allow scheduling_s to come from a pool (#4841)
* injection events use scheduling pool

* knock and prime

* bench test

* dropped this: *

* extract action before execute

* comment

* init allocated timers

* metrics

* dropped this: ,

* guard

* injection events use scheduling pool

* knock and prime

* bench test

* dropped this: *

* extract action before execute

* comment

* init allocated timers

* metrics

* dropped this: ,

* guard

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-12-10 17:55:51 -05:00
Matthew Kennedy 994ee2f22f
Combine angle based event (#4884)
* Remove AngleBasedEventOld/New, only AngleBasedEvent now

* this 7 year old comment of old test code can go away
2022-12-10 17:07:02 -05:00
Matthew Kennedy 151416b005
default fuel cleanup and injection phase change (#4836)
* default fuel cleanup and injection phase change

* happy tests

* changelog

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-11-29 23:41:49 -05:00
Matthew Kennedy 5c50ad2db4
infer useOnlyRisingEdge by trigger type (#4621)
* most of the plumbing

* easy tests

* trigger types that are rise only

* configs

* change mode of various triggers

* vvt

* 898 test is now impossible 🥳

* s

* instant rpm test

* actually remove useOnlyRisingEdgeForTrigger

* remove vvtCamSensorUseRise

* s

* print

* one happy test

* another test

* happy testSomethingWeird

* happy testCamInput

* maybe fix it a different way

* better

* quad cam

* nb2 happy

* bad merge

* vvt test

* trigger.test1995FordInline6TriggerDecoder

* hellen gm e67

* changelog
2022-11-08 21:48:39 -05:00
Matthew Kennedy 7bd9dbf89e
fix vvt logging logic (#4747)
* fix vvt logging logic

* put that back

* flip condition to avoid branch on uninitialized value
2022-11-07 10:52:17 -05:00
rusefi 1f3ab0cf24 reducing ugly 2022-11-06 21:28:38 -05:00
Andrey a5136a0eae trigger refactoring: instance RPM #4740 2022-11-06 11:05:57 -05:00
rusefillc 36d5b1fbb6 minor trigger refactoring 2022-11-06 00:59:29 -04:00
Andrey ccca90cb55 Nissan defaults 2022-11-02 12:05:51 -04:00
Matthew Kennedy f760ae11c1
simplify initializeSkippedToothTrigger (#4674) 2022-10-17 16:05:27 -04:00
rusefillc d13a851c97 triggerImage: todo: support symmetrical crank 2022-10-16 10:33:38 -04:00
rusefillc 5fb9f7c2df triggerImage: todo: support symmetrical crank 2022-10-16 02:59:57 -04:00
rusefillc d91211106c triggerImage: todo: support symmetrical crank 2022-10-16 02:44:57 -04:00
Matthew Kennedy aa881efe89
fix 36-2-1 trigger (#4645)
* fix

* test files

* test real 4b11

* test.mk

* better angle error math

* test GM too

* changelog
2022-10-09 21:22:05 -04:00
Matthew Kennedy d6647025cc
2jz test (#4638) 2022-10-05 20:48:28 -04:00
Matthew Kennedy 940e0dc369
require ignition on for firing (#4628)
* 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
2022-10-04 20:36:03 -04:00
Matthew Kennedy ec5d48fb5b
remove 898 (#4634)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-10-04 20:12:57 -04:00
Matthew Kennedy cb86c014cf
fix instant rpm clearing bug (#4629)
* improve instant rpm

* changelog
2022-09-29 07:15:59 -04:00
Matthew Kennedy ca623eb6ee
plumbing parts of 4621 (#4622)
* plumbing parts of 4621

* show error list

* exit on error too!

* this test has some unhealthy undefined behavior

* no uninitialized values

* no that doesn't work

* remove the invalid data and the bug becomes obvious
2022-09-25 18:49:54 -04:00
Matthew Kennedy b089825a4a
schedule ignition charge by angle instead of tooth (#4513)
* schedule ignition charge by angle

* same mistake as #4536

* s

* wrap sparkAngle too

* AngleBasedEventNew

* function moved

* implement scheduleOrQueue

* prints
2022-09-25 11:00:55 -04:00
Matthew Kennedy ae6c44634b
better k gaps (#4623) 2022-09-25 09:14:29 -04:00
Matthew Kennedy b45f84fe20
#4619 (#4620) 2022-09-25 07:40:28 -04:00
Andrey 612d52645a Honda K cam wheels #3405 2022-09-25 00:26:42 -04:00
Andrey 9d27780974 Honda K cam wheels #3405 2022-09-24 23:49:41 -04:00
Andrey 111220d38c more inclusive configuration name 2022-09-24 23:49:41 -04:00
Andrey cff779dd78 K progress 2022-09-24 23:18:57 -04:00
Andrey a38d87b0e0 fancy default and reusing constant 2022-09-24 23:01:42 -04:00
Andrey 93e64a61a6 fancy 2022-09-24 22:54:58 -04:00
Andrey 33be12541b K 2022-09-24 15:37:51 -04:00
Andrey 0eef498b3e refactoring: extract constant 2022-09-24 15:33:01 -04:00
rusefillc c4699efe91 honda K enum rename 2022-09-23 20:13:14 -04:00
rusefillc 2f18168d47 K20 2022-09-23 20:13:14 -04:00
rusefillc ed72758a5d K20 2022-09-23 18:25:24 -04:00
Andrey 6cdb0dc0af deep rabbit holes are the best ones!
refactoring: encapsulation
2022-09-14 01:53:17 -04:00
Andrey 82cda62bac inline method to reduce confusion 2022-09-14 01:34:52 -04:00
Andrey 6b0941b8ed inline method to reduce confusion 2022-09-14 01:24:19 -04:00
rusefillc 2a05a31550 refactoring: type safety 2022-09-11 03:46:50 -04:00
rusefillc 851e8e48d3 refactoring: type safety 2022-09-11 02:57:35 -04:00
Matthew Kennedy 72299bd1ba
only report vvt position if we have full sync (#4547)
* only report vvt position if we have full sync

* comments

* make it selectable, since that makes the test useful
2022-09-08 16:15:36 -04:00
Andrey 8e49542600 trigger: in corner cases like NB2 and VQ35 those are not revolutions 2022-09-07 22:24:28 -04:00
Andrey 4934d76d88 tear down Engine god object #4511
just trying different things
2022-09-05 04:24:17 -04:00
Andrey 268a5c7964 tear down Engine god object #4511
just trying different things
2022-09-05 02:44:06 -04:00
Andrey c1b218b772 refactoring: let's use different names for different things 2022-09-05 01:16:24 -04:00
Andrey feb386a54b refactoring: moving field 2022-09-05 01:15:45 -04:00
Matthew Kennedy 9407150544
more granular trigger error messages (#4526)
* granular trigger error messages

* adjust test expectations

* explicitly test behavior
2022-09-04 09:15:24 -04:00
Andrey 7e340cceb3 refactoring: reducing outputChannels copy 2022-09-01 10:58:16 -04:00
Andrey da66fa055c refactoring: enum name clean-up 2022-09-01 00:23:33 -04:00
Andrey fef406a5a6 english do you speak it 2022-08-31 22:56:38 -04:00
rusefillc 5007084981 VQ trigger gaps improvement fix #4469
nice, unit test is happier!
2022-08-23 23:32:14 -04:00
rusefi 25778f0890 trigger gap logging: it's a mess :( 2022-08-21 12:38:29 -04:00
rusefi 0f320448ff refactoring: default argument value 2022-08-21 12:17:50 -04:00
Matthew Kennedy eebc810295
enable alwaysInstantRpm in some tests (#4461)
* test some with alwaysInstantRpm set

* more
2022-08-19 15:03:20 -04:00
Matthew Kennedy 423f69a842
allow logging multiple warnings at once (#4414)
* allow logging multiple warnings at once

* comment

* .Code

* Revert ".Code"

This reverts commit 2b986bd500.

* add a better comparison operator instead of conversion

* dot code

* Revert "dot code"

This reverts commit 35f6ae1007.

* force gcc-10 maybe?

* Revert "force gcc-10 maybe?"

This reverts commit 4ddf8bcefd.

* vq

* dot code

* dead

* dot code

* return may be null

* static_vector; maybe cyclic_buffer is broken or wrong tool for the job?

* move static vector

* put cyclic buffer back how it was since we don't use it now
2022-08-17 01:12:25 -04:00
Matthew Kennedy 76f5832db9
resolve VVT phase using every tooth, not just sync point (#4434)
* resolve VVT phase using every tooth, not just sync point

* fix tests

* comment

* changelog
2022-08-12 08:08:23 -04:00
rusefillc b5c2b70e23 refactoring: better field name 2022-08-09 20:32:39 -04:00
Andrey 7887b9d1e1 Extra gap ratios for custom trigger wheels fix #4375 2022-07-23 03:39:19 -04:00
rusefillc b628c81d26 Make hard-coded gap ratios visible on trigger documentation images #4172 2022-07-12 00:11:25 -04:00
rusefillc 1b28e292e2 logging of live data structs was: data points #3614
huh?
2022-06-29 02:42:03 -04:00
Matthew Kennedy c0f290b922
Injector scheduled by angle, not tooth index (#4208)
* 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
2022-06-24 17:43:23 -04:00
Matthew Kennedy fcd3d991ee
trigger tweaks cleanup (#4278)
* simplify some math

* we say yes to the todo

* and put back that test

* test
2022-06-23 23:11:29 -04:00
Matthew Kennedy 932f5e1f30
cam/crank sync improvements (#4152)
* clarify getOperationMode

* wait for phase synchronize to transition to sequential mode

* one test

* encapsulate vvtSyncCounter

* test

* Add option to stop VVT sync above some RPM

* getOrZero

* Revert "synchronized Phase handling improvements fix #4099"

This reverts commit 32d46d1f09.

* Revert "m_hasSynchronizedSymmetrical handling improvements #4099"

This reverts commit d5e131b1d0.

* remove synchronizedPhase

* only crank needs this

* changelog

* needsDisambiguation()

* test

* s

* bad merge

* put the timer back

* s

* s

* changelog

* test for new behavior

* correct parameter order

* spelling

* s

* s

* s

* tests merge happy

* bad merge

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-06-09 17:21:22 -04:00
Matthew Kennedy 4ada633206
Remove third trigger channel (#4226)
* remove third trigger

* clean up the honda mess

* there was nothing novel about this engine config

* include

* missed a few

* s

* x

* changelog

* don't set the third trigger input

* don't redefine the same thing 3 times

* only two inputs!

* test
2022-06-01 21:24:20 -04:00
Matthew Kennedy c0d8cbfef4
Trigger cleanup init (#4222)
* extra parameter

* name decoders in constructor

* s
2022-06-01 00:55:34 -04:00
rusefillc b7743f101f helping build 2022-05-31 10:45:32 -04:00
rusefillc 22d9bf056a heling build 2022-05-31 08:48:24 -04:00
Matthew Kennedy 70c2689f1e
remove trigger duty cycle calculation (#4213)
* This field was ignored.

* move pad out

* gone

* make trigger configuration a little clearer

* even simpler!

* format

* test fix

* remove duty cycle thing
2022-05-30 22:39:57 -04:00
Matthew Kennedy f945e6efc9
trigger configuration refactoring for clarity (#4212)
* This field was ignored.

* move pad out

* gone

* make trigger configuration a little clearer

* even simpler!

* format

* test fix
2022-05-30 19:36:47 -04:00
Matthew Kennedy 6f45d0fd46
Fix trigger error indicator (#4185)
* test and fix

* more shards!
2022-05-19 09:43:42 -04:00
Andrey d38d8a7840 altering technical debt 2022-05-15 10:07:17 -04:00
Matthew Kennedy ae91b2aea8
don't rely on triggerStateListener to detect trigger errors (#4164)
* Write proper TriggerDecoder tests

* Improve logic around sync loss

* these tests I understand

* these I sort of understand....

* the one error in the noiseless decoder is gone!
2022-05-13 18:48:26 -04:00
Matthew Kennedy 098b2c87c6
Proper decoder testing (#4166)
* Write proper TriggerDecoder tests

* patch test for un-patched decoder
2022-05-11 06:14:45 -04:00
Matthew Kennedy d4509cab8a
TriggerState -> TriggerDecoder (#4157) 2022-05-10 11:41:39 +03:00
rusefillc bd9639b91d Remove value copy from controller into outputChannels #4095 2022-05-08 08:50:27 -04:00
Matthew Kennedy b650bbe46c
Trigger gm 3 vs 5 (#4140)
* add parameter

* two modes

* add new mode to list

* format

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-05-06 08:25:44 -04:00
Matthew Kennedy e4a0979dc2
Brain pin is enum class (#4108)
* change most usages to Gpio::

* board configs

* engine configs etc

* isBrainPinValid, smart gpio

* generator

* generator

* generator

* connector yamls

* kinetis enums

* cypress txt

* kinetis config

* frankenso

* config generator

* actually do it for the others

* disable skips for pr ci

* fix tle8888

* misc

* weird cast from int

* needs this operator too

* this can be an unsigned subtract

* happy tests

* s

* kinetis isConfigurationChanged weirdness

* missed J/K

* cypress efifeatures

* build script mistake (!)

* mistake in smart gpio

* debounce

* eg33

* kinetis, so needy

* it's pretty green, we can skip these again
2022-04-28 17:32:39 -04:00
rusefillc ddd85e701e Remove value copy from controller into outputChannels #4095 2022-04-23 20:38:48 -04:00
rusefillc 71275e841b
m_hasSynchronizedSymmetrical handling improvements #4099 (#4101) 2022-04-23 19:45:29 -04:00
Andrey 4492bc760a m_hasSynchronizedSymmetrical handling improvements #4099 2022-04-23 19:03:59 -04:00
Andrey 7b64aa5880 m_hasSynchronizedSymmetrical handling improvements #4099 2022-04-23 18:46:12 -04:00
rusefillc 14e37e3cf4 FasterEngineSpinUp should be enabled by default fix #4094 2022-04-23 09:51:47 -04:00
rusefillc 3c7eb93fe1 steps towards ignition live data 2022-04-13 16:48:25 -04:00
Andrey 093de78ff3 Proper cam speed labels in triggers #4021 2022-04-03 17:56:47 -04:00
rusefillc e631988b22 Proper cam speed labels in triggers #4021 2022-04-03 12:22:47 -04:00
Andrey 204ac3961b Trigger setup in TS is highly confusing: hide operation mode from users? #4031
WOW it works?!
2022-04-03 02:30:43 -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 b0be8c4b66 Trigger setup in TS is highly confusing: hide operation mode from users? #4031
progress: this way test is less fake!
2022-04-03 02:13:56 -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
rusefillc 086739d20a Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077 2022-04-02 19:08:22 -04:00
rusefillc 174a3f33bd Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077 2022-04-01 22:05:25 -04:00
rusefillc b1de262520 toothed previous time #4019 2022-03-21 20:41:09 -04:00
Andrey 1b334656e1 Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077 2022-03-19 19:59:36 -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
rusefillc 3076027887 spelling 2022-03-14 13:11:10 -04:00
Matthew Kennedy 06437f304f
dead StartupFuelPumping (#3883)
* dead

* test

* dead config too
2022-02-03 08:01:21 -05:00
Matthew Kennedy 28f39fe71c
test organization (#3882)
* organize actuators

* this test can be useful

* don't name things misc

* fewer tests called misc

* fewer tests called "big" (?)

* unnecessary
2022-02-02 16:36:35 -05:00
Andrey 33df88d3f7 fixing NOISY_RPM handling via Sensor framework 2022-01-21 00:21:45 -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 e55eb28086 migrating to SensorType::Rpm API 2022-01-20 22:42:13 -05:00
Andrey c7a62bcdb3 migrating to SensorType::Rpm API 2022-01-20 22:04:45 -05:00
Matthew Kennedy 0932fcf94c
Improve NA/NB miata sync parameters (#3730)
* NA sync parameters

* NB vvt pattern too

* zach's car says tighten the gap

* look at that, we sync one cycle sooner!
2022-01-01 21:39:04 -05:00
Matthew Kennedy d5c4b79b1a
Nb2 crank sync special case (#3727)
* extract isSyncPoint

* test because why not

* check vvt resync nb2

* custom nb decoder

* test only resyncs once!

* good job valgrind, you found a bug!
2021-12-31 15:47:25 -05:00
Matthew Kennedy b3de217c1b
adjustment to #3722 (#3723)
* s

* behold, another bug a test caught

* test

* test generates usable trigger pattern so it works correctly

* comment

* don't need that
2021-12-31 01:21:21 -05:00
Matthew Kennedy 4981eb43d0
extract isSyncPoint function (#3726)
* extract isSyncPoint

* test because why not

* check vvt resync nb2

* clean up noise from test case

* clarify and comment
2021-12-30 11:39:04 -05:00
Andrey 19a8685644 refactoring 2021-12-24 16:51:31 -05:00
Matthew Kennedy a4871c703c
Autoscale all the things! (#3713)
* Map3D accepts any scaled_channel type

* consistency

* reinstate test

* fix ratio

* throttle, boost, gppwm

* scale ignition and VE

* tests
2021-12-22 08:09:41 -05:00
rusefillc 06ccf524dd MAP phase sensing #3544
removing dead implementation
2021-12-16 21:13:55 -05:00
Matthew Kennedy 256df56fa7
Honda K 12+1 decoder adjustment (#3694)
* adjust trigger

* real cranking

* mk
2021-12-14 21:10:01 -05:00
Matthew Kennedy 6de8364895
maybe more working MAP sampling (#3689)
* what if we do this

* cleanup

* s

* test
2021-12-11 03:01:28 -04:00
Andrey 9ae24735f8 MAP phase sensing #3544 2021-12-10 17:28:03 -05:00
Andrey 50038167d8 MAP phase sensing #3544
new implementation seems complete?
2021-12-07 21:08:25 -05:00
Andrey e72d57438a MAP phase sensing #3544
new implementation
2021-12-07 20:00:04 -05:00
Andrey 6e49d66385 MAP phase sensing #3544
look new unit test!
2021-12-07 16:58:10 -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
rusefillc 2f45ed205c MAP phase sensing #3544
option to look for high and low peaks
2021-12-05 14:25:26 -05:00
rusefillc 0c91e77749 MAP phase sensing #3544
taking a step back to happy place
2021-12-04 18:21:10 -05:00
rusefillc aaf732f738 trigger_adc unit tests 2021-12-01 13:35:44 -05:00
Andrei 1047fed77c trigger_adc unit-test data files 2021-12-01 12:28:48 -05:00
Andrey e2fa1af527 MAP phase sensing #3544 2021-11-24 22:36:36 -05:00
Andrey 58c0fb4539 MAP phase sensing #3544 2021-11-24 21:53:32 -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
Matthew Kennedy a342bee57e
rpm calculator refactoring, gm 24x test (#3585)
* 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?
2021-11-20 14:59:02 +03:00
rusefillc e54d3b9e06 On -fpermissive in Windows in unit tests #3581 2021-11-20 00:16:03 -05:00
Scott Smith 98040ad9af
Make the module API more concise. (#3571)
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.
2021-11-17 21:50:00 -05:00
Scott Smith 988aacdd91
Create a base class EngineModule for that contains various useful callbacks. (#3548)
* 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
2021-11-17 20:13:19 +03: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 cb032fb1ea
(void) -> () (#3550)
* static functions with (void)

* more

* Revert "more"

This reverts commit 246e53441f.

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-15 13:02:34 +01:00
Matthew Kennedy 145316c497
less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01: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 2f4d123052
Change users of MultiChannelStateSequence to use the API (#3524)
Better than reaching into members that should be private. I didn't feel like actually making
them private though, as one user validates pinStates isn't NULL.
2021-11-11 09:19:22 -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
Scott Smith 158f719d95
Save ~2800 bytes of RAM by not caching angle->trigger mapping (#3506)
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
2021-11-09 07:03:27 -05:00
Andrey 6111355e6c Remove Miata MX5 NB1 trigger #3488 2021-11-06 20:24:41 -04: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
rusefillc d5de11bcc1 Override trigger gaps feature #2734 2021-10-30 11:09:10 -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 eb05f4594e very old very dead code 2021-10-20 12:57:07 -04:00
rusefillc 1493973bea very old very dead code 2021-10-20 10:38:36 -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 000afadd3f.

* enable bit in engine

* only turn off for one test

* Revert "undo test changes"

This reverts commit 106db49e29.
2021-10-02 01:10:24 -04:00
Andrey d478c9c411 reducing crazy in unit tests 2021-10-01 22:33:06 -04:00
Andrey b71d3c6111 reducing crazy in unit tests 2021-10-01 22:29:44 -04:00
rusefillc a6fbb98193 Complete fuel cut, maybe by wall wetting? Warning on decel (?) CUSTOM_OBD_SKIPPED_FUEL = 9010 fix #3225 2021-09-27 22:04:03 -04:00