Commit Graph

661 Commits

Author SHA1 Message Date
Matthew Kennedy 4c70708532 remove unnecessary "questionable trick" for error LED 2025-03-05 14:31:55 -08:00
Matthew Kennedy 86019ef085 don't pass around a scheduler to all PWM, get it from engine 2025-03-02 12:31:30 -08:00
Matthew Kennedy 9dcf76d99c
Remove stack checks (#558)
* remove stack checks

* put one back
2025-02-18 17:33:24 -08:00
Matthew Kennedy 2ebd882722
Ignition outputs use a mask like fuel (#553)
* remove skipped spark check

* this test no longer does anything

* ignition mask outputs

* tests

* extract function to calculate mask

* don't even store the mask
2025-02-13 20:31:09 -08:00
Matthew Kennedy ef9032bca4
Control injectors with a mask rather than pointers (#551)
* mostly implement

* tests

* tests

* tests

* properly handle single point injection

* fix tests

* fix tests

* scheduler

* format

* fix tests

* extract calculateInjectorOutputMask

* uncomment

* split injection just barely fits!

* provide a constructor so maybe mac is happy?

* don't bother storing the mask at all

* simplify

* make the pad bits predictable
2025-02-13 17:54:42 -08:00
Matthew Kennedy 6db1065750 use bit_cast for action_s constructor 2025-02-12 14:40:52 -08:00
Matthew Kennedy 002ae8eab9 show knock window on engine sniffer 2025-02-02 00:26:37 -08:00
Matthew Kennedy 1a7ca80f9e GPIO_NULL, EFI_ERROR_CODE 2024-12-28 15:07:29 -08:00
Matthew Kennedy fc709b236a format 2024-11-23 23:19:46 -08:00
Matthew Kennedy 6fd456559b RegisteredNamedOutputPin fix #285 2024-09-18 22:26:43 -07:00
Matthew Kennedy 8c87c19b5c SPARK_EXTREME_LOGGING cleanup 2024-09-18 22:11:13 -07:00
Matthew Kennedy 01a397094d
execute critical tasks on one big thread (#462)
* wire up main loop

* remove PeriodicTimerController

* patch up defines, comments

* happy simulator

* format

* simulator

* ETB runs via main loop

* happy tests

* protection against invalid LoopPeriod

* stack size

* ccm

* fix |= operator

* move perf trace

* ordering

* ordering
2024-09-17 15:27:38 -07:00
Matthew Kennedy 8d843f3cac people ask constantly about why this doesn't do what they want 2024-09-01 16:53:40 -07:00
Matthew Kennedy 77c5a150ee fix small can board 2024-08-29 11:23:58 -07:00
Matthew Kennedy 75a50695c6 extend engineModules.apply_all to onEnginePhase 2024-08-28 02:26:16 -07:00
Matthew Kennedy 6884fb83d3 useless comment 2024-08-28 01:33:08 -07:00
Matthew Kennedy ebc102aa08 name VVT PWMs 2024-08-13 14:36:51 -07:00
Matthew Kennedy 918e0f4c17 format 2024-07-23 18:00:09 -07:00
Matthew Kennedy 82bbc6064e std::isnan 2024-07-23 15:48:43 -07:00
Matthew Kennedy 63b07e5d1f cisnan -> std::isnan 2024-07-22 12:05:17 -07:00
Matthew Kennedy dd8dea61c0 rename Executor -> Scheduler 2024-07-11 17:03:13 -07:00
Matthew Kennedy 07b61ee0b4 doc 2024-07-11 16:49:49 -07:00
Matthew Kennedy e61e4c4b09 remove scheduleByTimestamp() 2024-07-11 16:38:42 -07:00
Matthew Kennedy 1731b30337 remove scheduleForLater 2024-07-11 16:27:30 -07:00
Matthew Kennedy db90cb3e0d minor event_queue cleanup 2024-07-11 16:11:47 -07:00
Matthew Kennedy bb1d5f26d2 for loop formatting 2024-07-03 00:22:48 -07:00
Matthew Kennedy e7d2b1c17c compile-time enforcement of printf strings 2024-06-10 01:15:39 -07:00
Matthew Kennedy 80358ad54e setTimeNowUs(): replace global fiddling with a functino call 2024-04-27 01:59:38 -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 8e4994627d default init is ok for these 2024-04-25 15:49:27 -07:00
Matthew Kennedy 79dfb0f2c4 wrap times in simple structs 2024-04-25 15:46:53 -07:00
Matthew Kennedy e332b32ed1 distinguish between "timestamp" and "duration" 2024-04-25 12:57:10 -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 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
rusefillc daf9c19689
additional coverage (#336)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2024-01-07 12:53:07 -08:00
rusefillc d2eb532126
signal_executor_sleep is not part of real firmware (#334)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2024-01-07 12:39:26 -08:00
rusefillc c7a79619e0
encapsulation (#335)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2024-01-07 12:32:41 -08:00
Matthew Kennedy a45b9ab611 minor housekeeping 2024-01-06 23:10:56 -08:00
Matthew Kennedy 17c6a46e84 optimize for hot thread stacks and data in CCM 2024-01-06 19:37:35 -08:00
Matthew Kennedy 6ff3bb49f7 that doesn't fit 2024-01-06 18:58:32 -08:00
Matthew Kennedy 7b46529dee move some stuff in to CCM 2024-01-06 18:52:37 -08:00
Matthew Kennedy f46ae91a79 wider guard of gpio check 2023-11-03 15:31:13 -07:00
Matthew Kennedy 9c3207f5ea event queue shadowing 2023-11-01 16:02:34 -07:00
Matthew Kennedy 1aa4d5d66e PWM shadowing 2023-11-01 16:02:27 -07:00
Matthew Kennedy 0fd5e33b89 happy hpfp test 2023-11-01 15:35:41 -07:00
Matthew Kennedy fe028f4f06 dc motor 2023-11-01 15:16:27 -07:00
Matthew Kennedy 21998dae2d tests 2023-11-01 15:14:53 -07:00
Matthew Kennedy ada987985d efi gpio de-shadowing 2023-11-01 14:54:57 -07:00