Commit Graph

365 Commits

Author SHA1 Message Date
Matthew Kennedy d0a4f7440c dead code 2025-01-18 15:39:39 -08:00
Matthew Kennedy 64eb875b12 each cylinder calculates its own offset 2025-01-18 01:54:48 -08:00
Matthew Kennedy 73edd28251 cylinders know their own index and number 2025-01-18 01:40:18 -08:00
Matthew Kennedy 0e2709cd91 start refactoring towards OneCylinder 2025-01-18 01:03:44 -08:00
Matthew Kennedy 54447b1254 relocate getSparkDwell 2024-12-24 02:30:46 -08:00
Matthew Kennedy 4c770b3431 unnecessary includes 2024-12-24 02:15:40 -08:00
Matthew Kennedy 76800a4961 extract firing order logic to its own file 2024-12-24 01:44:13 -08:00
Matthew Kennedy 28fc04ee3d int rpm -> float rpm 2024-09-25 00:04:00 -07:00
Matthew Kennedy a329b3afca int rpm -> float rpm 2024-09-24 23:21:39 -07:00
Matthew Kennedy b5271f0991 misc logging cleanup 2024-09-18 22:17:07 -07:00
Matthew Kennedy 51a23364e2
Odd cylinder engine wasted spark (#479)
* allow wasted spark spin-up

* allow firing without phase sync on odd cyl engines

* support odd cyl wasted spark

* changelog

* unit test it

* wow, it's easy to support odd-fire too
2024-08-31 02:22:31 -07:00
Matthew Kennedy 63b07e5d1f cisnan -> std::isnan 2024-07-22 12:05:17 -07:00
Matthew Kennedy 5fd3056d40 add firing orders 2024-04-03 14:16:28 -07:00
Matthew Kennedy 8680b22816 move a bunch of tables out of engine_configuration_s #371 2024-03-17 12:06:14 -07:00
Matthew Kennedy 6b0e41ce45 remove single use function 2024-01-17 02:58:45 -08:00
Matthew Kennedy cde642ae61 Blend tables can override Y axis 2024-01-17 02:43:04 -08:00
mi-hol 1d5c7fd220
clarify OBD error code CUSTOM_ERR_6566 to CUSTOM_ERR_CYL_ANGLE (#330)
* Update engine_math.cpp

* Update obd_error_codes.h

As suggested in https://github.com/FOME-Tech/fome-fw/pull/223#issuecomment-1684889630
2024-01-06 09:21:53 -08:00
Matthew Kennedy 987aa618dc make wrapAngle a function not macro 2023-10-19 15:21:44 -07:00
Matthew Kennedy 7b955cb1b3 fixAngle -> wrapAngle 2023-10-19 14:34:29 -07:00
Matthew Kennedy d5f9479f28
ObdCode is enum class (#77)
* change ObdCode to enum class builds firmware

* test builds

* don't need this line at all

* can we go down to uint16_t?
2023-04-12 23:44:33 -07:00
Matthew Kennedy d6534157a0 rename obd_code_e -> ObdCode 2023-04-11 16:32:47 -07:00
Matthew Kennedy 2f85cd60d4 use ECU-calculated blend table axis values 2023-04-02 13:56:42 -07:00
Matthew Kennedy 1bc1e76efa blend result returns blend parameter value for TS UI 2023-04-02 13:50:34 -07:00
Matthew Kennedy f090a97b0b remove specs_s struct, flatten config 2023-03-27 00:58:18 -07:00
rusefillc 2d9298e586 ohhh we already have FO_1_2_3_4_5_6_7_8 2022-12-20 21:23:25 -05:00
rusefillc f49cae527c FO_1_2_3_4_5_6_7_8 2022-12-20 21:13:33 -05:00
rusefillc d951f36794 guards 2022-12-17 14:36:27 -05:00
Matthew Kennedy 7b47e77e58 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
rusefillc 6402e61484 minor trigger refactoring 2022-11-05 22:30:08 -04:00
Matthew Kennedy acec8f2da3 VE blend tables (#4640)
* blendy ve too

* ui

* small optimizations

* save kinetis memory

* changelog
2022-10-19 06:42:22 -04:00
Matthew Kennedy 0dfba2a655 remove ignitionPin (#4608)
* remove ignitionPin

* now that's gone

* BMW test
2022-09-23 17:30:10 -04:00
Andrey b439f27284 inline method to reduce confusion 2022-09-14 01:34:52 -04:00
Andrey 34f87a3683 inline method to reduce confusion 2022-09-14 01:24:19 -04:00
Andrey 110c49949d some dead nonsense 2022-09-14 01:15:26 -04:00
Andrey d256fd2b01 removing dead parameter 2022-09-14 01:13:57 -04:00
Andrey b059e9defb tear down Engine god object #4511
just trying different things
2022-09-14 01:09:32 -04:00
Andrey ab3d92b995 tear down Engine god object #4511
just trying different things
2022-09-05 04:24:17 -04:00
Andrey 54ac7279b1 refactoring: reducing outputChannels copy 2022-09-01 00:13:55 -04:00
Matthew Kennedy 27c98f70fe 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 e64c8cfccb.

* Revert "m_hasSynchronizedSymmetrical handling improvements #4099"

This reverts commit 5454b8f509.

* 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 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
rusefillc c557b4ec30 Revert "Ford Mustang firing order 1-5-4-2-6-3-7-8 fix #4150"
This reverts commit 086b4885c9.
2022-05-08 07:10:54 -04:00
rusefillc 086b4885c9 Ford Mustang firing order 1-5-4-2-6-3-7-8 fix #4150 2022-05-08 07:07:34 -04:00
Andrey 03662e48c4 Move curves out of engineConfiguration in order to reduce RAM usage #4127 2022-05-01 23:43:43 -04:00
Matthew Kennedy 2d033df11b 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 089d7f5cd1 steps towards ignition live data 2022-04-13 16:48:25 -04:00
Matthew Kennedy 5cf2b1bba5 warning cleanup (#4020) 2022-03-22 16:53:24 -04:00
Matthew Kennedy fae8b9ec06 clean up timing table defaults (#3705)
* less crazy configs

* cleanup

* make that test happy
2021-12-20 08:02:38 -05:00
Andrey faa29f0dc2 2 byte table axis #3045
fixing build
2021-12-20 01:50:23 -05:00
Matthew Kennedy b2af3637a2 simplify cylinder phasing (#3650) 2021-12-05 10:46:35 -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