Commit Graph

568 Commits

Author SHA1 Message Date
Matthew Kennedy 6fc52a1430 move map averaging to module 2024-08-29 13:26:57 -07:00
Matthew Kennedy 6af46b59a9 MAP averaging can use common math for cyl offset calc 2024-08-28 02:58:21 -07:00
Matthew Kennedy 75a50695c6 extend engineModules.apply_all to onEnginePhase 2024-08-28 02:26:16 -07:00
Matthew Kennedy f80ffd4ddf clamp map sampling duration to fit between cylinders 2024-08-28 01:48:41 -07:00
Matthew Kennedy 4ae3056257 dead MAP debug mode 2024-08-28 01:43:34 -07:00
Matthew Kennedy 23cfa4e2c6 Schedule MAP by angle instead of tooth #38
Do MAP sampling like we do ignition/fuel, rather than scheduling everything at once at the same trigger tooth.
2024-08-28 01:39:49 -07:00
Matthew Kennedy 7ffbaf4e5e decouple MAP sampling from trigger central 2024-08-28 01:19:53 -07:00
Matthew Kennedy 6392016f94 remove mapAveragingSchedulingAtIndex 2024-08-20 12:49:23 -07:00
Matthew Kennedy 36c45a0e57 log per-cylinder map sampling 2024-08-05 22:08:48 -07:00
Matthew Kennedy d477d7c5f4 map sampling logs sample count 2024-08-05 21:45:23 -07:00
Matthew Kennedy 6a10aceb16 log map averaging duration 2024-08-05 21:42:32 -07:00
Matthew Kennedy ff5e47c95d
Engine modules participate in the build system (#452)
* infrastructure for engine modules in the build

* fully move fuel pump

* fan

* gear detector

* gear detect

* fan control cleanup

* trip odometer

* shuffle makefiles around a little

* minor format
2024-07-23 18:05:43 -07:00
Matthew Kennedy aa5ea293e6 cisnan -> std::isnan 2024-07-22 12:15:40 -07:00
Matthew Kennedy 63b07e5d1f cisnan -> std::isnan 2024-07-22 12:05:17 -07:00
Matthew Kennedy d19db63d0e dead error code 2024-07-21 22:22:14 -07:00
Matthew Kennedy dd8dea61c0 rename Executor -> Scheduler 2024-07-11 17:03:13 -07:00
Matthew Kennedy bb1d5f26d2 for loop formatting 2024-07-03 00:22:48 -07:00
Matthew Kennedy 7e07d87088 bundle up MAP samplers 2024-06-15 14:52:29 -07:00
Matthew Kennedy 743bef85d2 minimum priming delay of 0.1 second 2024-06-14 23:12:03 -07:00
Matthew Kennedy 6758e2dfc0 compile-time enforcement of printf strings 2024-06-10 00:53:24 -07:00
Matthew Kennedy cf87e64119 compile-time enforcement of printf strings 2024-06-10 00:51:14 -07:00
Matthew Kennedy 2dbe992780 priming debugging 2024-06-10 00:25:07 -07:00
Matthew Kennedy a39738d4af prime error logging 2024-06-09 22:06:46 -07:00
Matthew Kennedy 8c8d18e435 avoid float -> long 2024-05-11 13:35:04 -07:00
Matthew Kennedy 9efd565d29 avoid long -> float conversion 2024-05-11 13:13:59 -07:00
Matthew Kennedy 9ab794a461 avoid long -> float conversion 2024-05-11 13:07:47 -07:00
Matthew Kennedy a474543580 Wait. Why do we even use Map3D here? #246 #417 2024-05-03 22:18:09 -07:00
Matthew Kennedy d98867fc44 KnockController::onConfigurationChange(nullptr) 2024-05-03 22:11:42 -07:00
Nathan Schulte b8d7b2d75b
fix knock retard table init (#419)
* fix knock retard table init

column and row definition were swapped w/re: value lookup

fixes #246, #417

* initialize knock controller / max retard table on reset

* fix KnockController init

no need for previousConfig (or any config ref); use the current config
2024-05-03 21:57:26 -07:00
Matthew Kennedy 32d2a81529 more default init vs = 0 2024-04-27 01:32:45 -07:00
Matthew Kennedy 632c493c4f little bit of encapsulatino 2024-04-25 16:18:51 -07:00
Matthew Kennedy dce084fdcb duration vs timestamp 2024-04-25 15:18:41 -07:00
Matthew Kennedy 0c30e1e148 use timer instead of home spun time math 2024-04-25 15:11:13 -07:00
Matthew Kennedy 9ebdc88bb4 use timer instead of home spun time math 2024-04-25 15:06:11 -07:00
Matthew Kennedy e332b32ed1 distinguish between "timestamp" and "duration" 2024-04-25 12:57:10 -07:00
Matthew Kennedy af4ec4ab19 add std::function hooks to ignition 2024-04-12 11:11:44 -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 498824eff4 tabs 2024-03-12 15:28:52 -07:00
Matthew Kennedy f8070a922a
implement & test backend for injection splitting (#367)
* framing dual injection

* fix test

* uncomment logic

* format

* start test

* good test

* add todo
2024-02-21 10:54:27 -08:00
Matthew Kennedy 9035b574ca fix tests 2024-02-16 14:10:57 -08:00
Matthew Kennedy be00d34d0c put fuel scheduling actually in fuel_schedule.cpp 2024-02-16 13:49:42 -08:00
Matthew Kennedy afe8b23787 put all backup data in SRAM, not in RTC registers 2024-02-06 11:43:13 -08:00
Matthew Kennedy 13f9337d16 enum class-ify 2024-02-06 11:04:34 -08:00
GitHub gen-configs Action 2c42d8d83c Auto-generated configs and docs 2024-01-19 12:02:28 +00:00
rusefillc 6ef65a39c4
encapsulation? (#337)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2024-01-14 14:29:20 -08:00
Matthew Kennedy 9673ff01f3
implement staged injection (#331)
* output channel

* duty cycle etc math for second stage

* action_s utility

* basic enable switch

* staging fraction math

* implement staging logic

* wire up pins for second stage injectors

* staging UI

* Improve staged injection test, check scheduler arguments for other injection tests

* Stage 2 last pulse output channel, correct fuel consumption logic

* wall wet on the whole shot

* int vs size_t

* use a define instead of function so we get line numbers

* fix batch injection

* gauges

* bad test merge

* stub out secondary injector model
2024-01-07 15:22:39 -08:00
Matthew Kennedy a45b9ab611 minor housekeeping 2024-01-06 23:10:56 -08:00
Matthew Kennedy 05c5282aa3 remove inaccurate comments - we have ignition overdwell protect 2024-01-06 20:28:02 -08:00
Matthew Kennedy 7b46529dee move some stuff in to CCM 2024-01-06 18:52:37 -08:00
Matthew Kennedy 7e2097056c unused parameters 2024-01-06 18:31:18 -08:00
Matthew Kennedy caa7e62b0e
new parser datalog support (#205)
* stale comments

* conform inputs

* implement datalog writing

* stale comment

* s

* stub out more support

* OutputChannelWriter

* tweak inputs so there's less diff later
2023-11-23 18:53:56 -08:00
Matthew Kennedy e0b5c5b61d don't spam simulator with warning 2023-11-13 02:24:42 -08:00
Matthew Kennedy 0aee861107 gpio, thermistor, knock shadowing 2023-11-01 16:09:39 -07:00
Matthew Kennedy 21998dae2d tests 2023-11-01 15:14:53 -07:00
Matthew Kennedy 44bd9af964 misc anti shadow 2023-11-01 14:59:36 -07:00
Matthew Kennedy f835025a2f remove wrapAngle2, wrapAngle does fine 2023-10-19 14:46:55 -07:00
Matthew Kennedy 7b955cb1b3 fixAngle -> wrapAngle 2023-10-19 14:34:29 -07:00
Matthew Kennedy 3999272d24 fix injection SOI log channel 2023-10-19 14:10:44 -07:00
Matthew Kennedy 38c873252e
smarter injector duty cycle limiting (#215)
* config for duty cycle limiting

* implement timeout duty cycle limiting

* comment

* make overlapping injections actually work!

* missed one

* test

* call addFuelEvents from fast callback

* update comment about why we call it again in main trigger callback

* one more extra call

* undo addFuelEvents change

* cleanup

* minor encapsulation

* fix

* changelog

* dead obd code
2023-10-14 14:27:19 -07:00
Matthew Kennedy e09ed790eb extract injection refactoring from #215 2023-10-12 18:00:33 -07:00
Matthew Kennedy 5e01450fee lock injection timing at high duty cycle to avoid skipped injections 2023-10-11 23:43:31 -07:00
Matthew Kennedy 4b354f047b
trip odometer (#260) 2023-09-25 13:16:17 -07:00
Matthew Kennedy 4e2dbe0c15 old comment 2023-09-25 11:12:23 -07:00
GitHub gen-configs Action 371e2d099c Auto-generated configs and docs 2023-09-25 18:09:04 +00:00
Matthew Kennedy 2346086b06
knock live data (#261)
* Move knock data to knock controller

* appease tsConfigVersion

* make reapply logic easier to read
2023-09-25 11:06:48 -07:00
Matthew Kennedy 6bf8fcb9ef faster knock logging 2023-09-15 00:59:38 -07:00
Matthew Kennedy 6f4a4fc373
implement ignition timing clamping (#212)
* implement ignition timing clamping

* ui, improved comment

* wrap atdc timing correctly

* tests
2023-07-21 15:55:04 -07:00
GitHub gen-configs Action 62ad0beb1d Auto-generated configs and docs 2023-07-19 07:23:44 +00:00
Matthew Kennedy d9c9f6beeb good behavior in single point 2023-06-26 01:12:08 -07:00
Matthew Kennedy 1885f3eca3 make spark and fuel more similar 2023-06-25 01:46:33 -07:00
Matthew Kennedy ade14a956f make spark and fuel more similar 2023-06-25 01:37:45 -07:00
Matthew Kennedy e5ee320b67 make spark and fuel more similar 2023-06-25 01:31:30 -07:00
Matthew Kennedy b0c3357cba #23 and fix https://github.com/rusefi/rusefi/issues/5353 2023-06-24 20:14:37 -07:00
Matthew Kennedy 06b39dbb07
trigger and engine types -> enum class (#113)
* trigger type is enum class

* java tooling

* enum class engine_type_e

* enum class engine_type_e
2023-06-01 13:47:49 -07:00
Matthew Kennedy 04e6f45ce9 log per-cylinder timing #76 2023-05-31 11:38:06 -07:00
Matthew Kennedy 41339c5418 change to log base timing 2023-05-31 11:22:41 -07:00
Matthew Kennedy ad3ea57276 tooth_logger.h -> pch 2023-05-30 22:41:20 -07:00
Matthew Kennedy 9621ff844e add ignition/injection mode output channel #85 2023-04-28 00:27:43 -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 778289455b this warning is not useful fix #79 2023-04-12 19:42:44 -07:00
Matthew Kennedy 489d016682 function >>> macro 2023-04-12 19:32:52 -07:00
Matthew Kennedy 0c644e2b2e format 2023-04-11 17:17:50 -07:00
GitHub gen-configs Action 996cfd2721 Auto-generated configs and docs 2023-03-27 08:38:48 +00:00
Matthew Kennedy f090a97b0b remove specs_s struct, flatten config 2023-03-27 00:58:18 -07:00
Matthew Kennedy e5d28022ad spammy prints cleanup 2023-03-16 01:27:03 -07:00
GitHub gen-configs Action 456229d49e Auto-generated configs and docs 2023-03-15 18:57:35 +00:00
Matthew Kennedy cd6b770945 is this just dead? 2023-03-03 02:05:50 -08:00
Matthew Kennedy 3fa2f44014 remove twoWireBatchIgnition 2023-03-02 22:23:24 -08:00
Matthew Kennedy c551aef780 no reason to warn about injection pins, I think you already know 2023-02-24 23:57:15 -08:00
Matthew Kennedy 711e90f3d3
remove old trigger noise detector (#44)
* remove old noiseless decoder layer

* test
2023-02-23 11:27:56 -08:00
Matthew Kennedy 5d7a30ce2b no qc 2023-02-22 14:53:31 -08:00
Matthew Kennedy 959f14fae6 more dead 2023-02-21 11:54:24 -08:00
Matthew Kennedy 0e12622371 cdm ion 2023-02-20 22:37:14 -08:00
Matthew Kennedy e1af81e1d7 hip9011 2023-02-20 22:32:32 -08:00
Andrey 3d096b2ac1 totalFuel and totalIgnition correction gauges in Tunerstudio #4955 2023-01-15 08:26:38 -05:00
Andrey df2b073c49 totalFuel and totalIgnition correction gauges in Tunerstudio #4955 2023-01-14 23:21:23 -05:00
Matthew Kennedy 5471321363 don't warn if we intentionally skipped this spark (#4961)
* don't warn if we intentionally skipped this spark

* header

* real nb2
2023-01-10 19:07:44 -05:00
Andrey G a274b1f777 Feed mapAveragingAdcCallback() with volts not adc raw values (#4940) 2023-01-05 12:14:48 -05:00
rusefillc 875a3dbe57 CI is useful 2023-01-01 11:30:50 -05:00
rusefillc 886ec74442 antilag and anti-lag #2403
TurboMarian is the ALS boss
2022-12-21 20:12:00 -05:00