Commit Graph

211 Commits

Author SHA1 Message Date
Matthew Kennedy 61e5b4b1ad change ObdCode to enum class builds firmware 2023-04-29 00:44:00 -04:00
Matthew Kennedy 2857e9527d remove specs_s struct, flatten config
(cherry picked from commit f090a97b0b)
2023-04-28 20:59:11 -04:00
rusefi 6c0c5663ac misc 2023-04-20 13:48:55 -04: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 2c58579a8d
switch hpfp and aux valves to AngleBasedEventNew (#4882)
* switch hpfp to AngleBasedEventNew

* aux valves too!
2022-12-10 16:15:11 -05:00
Matthew Kennedy af7e4f6fe5
two modes trigger scheduler (#4598)
* two modes trigger scheduler

* asOld

* hpfp
2022-09-20 05:28:23 -04:00
Andrey G 55c1f53c75
dead code, reduce typedefs (#4566)
* 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
2022-09-11 16:08:11 -04:00
Matthew Kennedy aecacc6aa1
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 66fffee321
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 289122c0b7
fix 4032 (#4034)
* fix 4032

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

This reverts commit 7566328816.

* JNI for test coverage #3965

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-03-14 22:15:21 -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 9d0f1fe64a
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 d8073e8b27
remove mock adc (#3888)
* remove mock adc

* do these do /anything/?
2022-02-03 20:43:34 -05:00
Andrey cda2b711cf migrating to SensorType::Rpm API 2022-01-20 23:32:59 -05:00
rusefillc 4db4ac060c Code style for methods with zero arguments #3535 2022-01-11 22:40:52 -05:00
rusefillc f1900b4887 On -fpermissive in Windows in unit tests #3581 2021-11-20 00:23:27 -05:00
Scott Smith 18c27a6e9c
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 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 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
Andrey 655b77dc3f random refactoring: trigger central encapsulation 2021-11-15 20:22:05 -05:00
Matthew Kennedy 145316c497
less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
rusefillc 610c2b0ad1 lua curve progress 2021-11-05 10:34:12 -04:00
Andrey 7398ba5059 reducing crazy in unit tests 2021-10-01 22:50:09 -04:00
Andrey 7363ac5c09 zero dwell warning at zero RPM #3153 2021-08-16 09:11:30 -04: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 f16173b4dd
call handleShaftSignal (#3097) 2021-08-02 07:02:45 -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
Andrey 03bb3e3ace trigger signal debug pins - logic level output #2959
test driven development is still amazing
2021-07-15 09:29:14 -04:00
Andrey 74e5eb8bb7 trigger signal debug pins - logic level output #2959 2021-07-15 02:12:57 -04:00
Matthew Kennedy 7a21f7fbc0
inject (#2938) 2021-07-09 17:02:25 -04:00
rusefillc 70fd233740 random progress 2021-07-09 14:27:10 -04:00
Andrey 0aa8693f21 Matt has CUSTOM_ERR_VVT_OUT_OF_RANGE warning #2921 2021-07-07 23:55:49 -04:00
Andrey 7c7766efcc VW warnings on cranking #2861 2021-06-26 16:05:43 -04:00
Andrey 288c2620c6 .logicdata files closer together 2021-06-25 12:45:41 -04:00
Andrey 76840d07db better test coverage 2021-06-24 23:38:16 -04:00
Andrey 1c48a61339 refactoring 2021-06-23 06:37:32 -04:00
Andrey cbfc4cdd8d Trigger: warning code on normal engine start up #669 2021-06-23 05:00:26 -04:00
Matthew Kennedy ab214f974c
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 c26987b96b
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 41804736e2 engine sniffer into unit tests 2021-04-04 22:41:38 -04:00
rusefillc 490d3a6957 test_timer 2021-03-12 00:43:48 -05:00
Matthew Kennedy 39884f8934
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 6168bcea80
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 9b4a1fff7b clang warnings again #2055 2020-12-11 10:33:00 -05:00
Matthew Kennedy 5f69d23976
fix mock pins array (#2050)
* fix

* fix probably
2020-12-10 00:10:58 -05:00
rusefillc 53f6f1e661 Starter seems to be engaged forever #1965 2020-11-18 22:42:41 -05:00