Commit Graph

206 Commits

Author SHA1 Message Date
Matthew Kennedy 4e78c4c922 two modes trigger scheduler (#4598)
* two modes trigger scheduler

* asOld

* hpfp
2022-09-20 05:28:23 -04:00
Andrey G 2b4012b279 dead code, reduce typedefs (#4566)
* Do lightweight checks first

* Dead getTimeIgnitionSeconds()

Dead since 5274cffff3

* 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
2022-09-11 16:08:11 -04:00
Matthew Kennedy ab24c5eb35 Rewrite tooth logger buffer management (#4317)
* s

* make it work

* put back enough maybe

* fix console composite log

* unit tests can just use a vector, why not

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-07-04 16:57:17 -04:00
Matthew Kennedy cf51533f45 More trigger encapsulation (#4207)
* trigger decoder returns a result

* TriggerFormDetails

* s

* don't reach out and touch the engine
2022-05-29 13:49:00 -04:00
Matthew Kennedy fc4e6cbdb3 fix 4032 (#4034)
* fix 4032

* board defaults should not set these things
2022-04-03 06:58:25 -04:00
rusefillc 9ae96ea7e5 refactoring: method rename 2022-04-02 21:01:29 -04:00
rusefillc f8f311bb87 gtest in library is hard (#3998)
* Revert "Revert "JNI for test coverage #3965""

This reverts commit d1df67b8d5.

* JNI for test coverage #3965

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-03-14 22:15:21 -04:00
Matthew Kennedy 9d213b6584 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 65ff145a8d Jni engine (#3995)
* JNI for test coverage #3965

* JNI for test coverage #3965

* JNI for test coverage #3965
2022-03-13 20:03:49 -04:00
Matthew Kennedy 31c0afc79f remove mock adc (#3888)
* remove mock adc

* do these do /anything/?
2022-02-03 20:43:34 -05:00
Andrey 5f3324cd6b migrating to SensorType::Rpm API 2022-01-20 23:32:59 -05:00
rusefillc dd4950f850 Code style for methods with zero arguments #3535 2022-01-11 22:40:52 -05:00
rusefillc 6766ff8cab On -fpermissive in Windows in unit tests #3581 2021-11-20 00:23:27 -05:00
Scott Smith aba4e5167e Separate out scheduleOrQueue into it's own standalone scheduler. (#3573)
It's a large enough entity that it shouldn't be buried in ignition logic.
2021-11-18 14:27:21 -05:00
Scott Smith 659cc68be1 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 dac2ae9b1d 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 7296593448 remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -05:00
Scott Smith 2cfc4af998 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
Andrey 7b790d36f6 random refactoring: trigger central encapsulation 2021-11-15 20:22:05 -05:00
Matthew Kennedy bd04dc8352 less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
rusefillc 57dc9b36f4 lua curve progress 2021-11-05 10:34:12 -04:00
Andrey f557a59367 reducing crazy in unit tests 2021-10-01 22:50:09 -04:00
Andrey 8a7eb2173f zero dwell warning at zero RPM #3153 2021-08-16 09:11:30 -04:00
Matthew Kennedy 4e6b61234f 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 9a3d385ea5 call handleShaftSignal (#3097) 2021-08-02 07:02:45 -04:00
Matthew Kennedy d3ec2b21d1 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
Andrey 85d6d6c70d trigger signal debug pins - logic level output #2959
test driven development is still amazing
2021-07-15 09:29:14 -04:00
Andrey 8a49009f44 trigger signal debug pins - logic level output #2959 2021-07-15 02:12:57 -04:00
Matthew Kennedy 1bba234920 inject (#2938) 2021-07-09 17:02:25 -04:00
rusefillc 06c364247f random progress 2021-07-09 14:27:10 -04:00
Andrey 40f823662c Matt has CUSTOM_ERR_VVT_OUT_OF_RANGE warning #2921 2021-07-07 23:55:49 -04:00
Andrey c1eda5dec8 VW warnings on cranking #2861 2021-06-26 16:05:43 -04:00
Andrey 1c87b9ccfe .logicdata files closer together 2021-06-25 12:45:41 -04:00
Andrey 3efd959da8 better test coverage 2021-06-24 23:38:16 -04:00
Andrey feb56dad72 refactoring 2021-06-23 06:37:32 -04:00
Andrey 4ea9df4cc1 Trigger: warning code on normal engine start up #669 2021-06-23 05:00:26 -04:00
Matthew Kennedy de00c7fef7 Bandaid for 2735 (#2788)
* bandaid

* fix test

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-06-02 12:02:52 +03:00
Matthew Kennedy 5f0791f9fb Destroy all shared logger (#2574)
* most of shared logger

* a few more

* one more

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 14:28:48 -04:00
rusefillc 549839b0de engine sniffer into unit tests 2021-04-04 22:41:38 -04:00
rusefillc 3651883bcf test_timer 2021-03-12 00:43:48 -05:00
Matthew Kennedy 55facb6613 use DECLARE_ENGINE_PTR for Engine class (#2365)
* engine cleanup

* do the cleanup

* one last spot

* expand_engine noop for firmware

* simulator
2021-02-16 16:58:54 -05:00
Matthew Kennedy 30fd52d82d Fix gpio reinit race condition (#2098)
* fix unregister api for gpio

* consumers

* guard with a critical section

* index

* guard less

* unregister under lock

* fix reinit

* dead flag

* fix most tests

* initialize properly

* initialize properly

* assertions in tests

* fix message

* we must lock earlier to be truly safe

* this was using huge memory

* devirtualize
2020-12-18 17:18:12 -05:00
rusefillc 47db5d0d99 clang warnings again #2055 2020-12-11 10:33:00 -05:00
Matthew Kennedy ce2e7d3cbe fix mock pins array (#2050)
* fix

* fix probably
2020-12-10 00:10:58 -05:00
rusefillc b6dac8dac2 Starter seems to be engaged forever #1965 2020-11-18 22:42:41 -05:00
rusefillc b41df605b4 Starter seems to be engaged forever #1965 2020-11-18 21:22:01 -05:00
rusefi f92d894d14 nicer parameter name 2020-09-21 08:57:56 -04:00
David Holdeman e8e2cf2cfd DebounceButton A/C switch (#1782)
* change acSwitch name, add mode

* fix

* remove some adc stuff

* remove some adc stuff

* semicolon stupid

* left behind

* add readpinstate

* wrong var name

* add functions back

* fix name

* bool, not void, plus fix name

* move

* not sure what I broke

* try setMockValue

* namespace

* whoops missed one

* switch values because adc was set up for pullup

* try 5

* comment for now

* comment for now

* uncomment tests, add function to mock, add mock to efiReadPin

* fixes

* for F's sake

* if

* add defy

* pass params

* use ASSERT_TRUE/FALSE

* advance time

* remove ifdef from readPin

* try moving if

* move to separate func

* move extern

* move include

* try engine_test_helper

* am confuse

* move func to else

* include hal

* add efi prod check

* remove include

* try extern

* move include

* semicolon stupid

* move extern again

* include

* move mockPinStates

* size

* add if

* add comment

* clean on instantiation
2020-09-10 22:16:20 -04:00
Matthew Kennedy eea3f2cf36 fix tests 2020-07-28 14:27:34 -07:00
Matthew Kennedy a3c0942e1a eth adjustments 2020-07-28 14:18:50 -07:00