Commit Graph

1688 Commits

Author SHA1 Message Date
Andreika 6be915f7af
can_isotp fix? (#3678)
Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2021-12-08 18:12:51 -05:00
Matthew Kennedy 4148ee76bf
smarter priming logic (#3674)
* ignition controller detects rising edge on voltage

* update test

* comment

* ignore negative transients

* tweak

* test

* priming happens on ignition-on

* priming has its own scheduling

* config & UI

* dead config

* implementation

* look, the test caught a bug

* keep the watchdog happy

* bad merge

* changelog

* easier to read the test

* test naming
2021-12-08 16:20:19 -05:00
rusefillc f1855a41ae docs 2021-12-08 16:05:57 -05:00
Andreika 72cefd42de
CAN ISO-TP progress (+unit-tests fix) (#3677)
Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2021-12-08 15:11:19 -05:00
rusefillc 3a33e59b86 rusEFI console ISO-TP via PCAN #3667 2021-12-08 12:01:28 -05:00
rusefillc f104e4cc2f rusEFI console ISO-TP via PCAN #3667 2021-12-08 11:55:34 -05:00
Matthew Kennedy 2050580a16
prime upon ignition voltage, not on power on (#3662)
* ignition controller detects rising edge on voltage

* update test

* comment

* ignore negative transients

* tweak

* test

* priming happens on ignition-on

* priming has its own scheduling

* test

* dead adjacent line of code
2021-12-08 07:26:49 -05:00
Matthew Kennedy 91ec135cf8
ignition controller detects rising edge on voltage (#3636)
* ignition controller detects rising edge on voltage

* update test

* comment

* ignore negative transients

* tweak

* test
2021-12-07 21:28:04 -05:00
Andrey 50038167d8 MAP phase sensing #3544
new implementation seems complete?
2021-12-07 21:08:25 -05:00
Andrey e72d57438a MAP phase sensing #3544
new implementation
2021-12-07 20:00:04 -05:00
Andrey 73fb5a2ef8 docs 2021-12-07 19:59:43 -05:00
Andrey 8b246a8d92 refactoring 2021-12-07 17:00:42 -05:00
Andrey 6e49d66385 MAP phase sensing #3544
look new unit test!
2021-12-07 16:58:10 -05:00
Matthew Kennedy 3a95e86112
calculate per-cylinder ignition timing (#3652)
* simplify cylinder phasing

* per cylinder timing

* s

* s

* s

* why was there a divide by 2?
2021-12-06 21:19:37 -05:00
rusefillc 2f45ed205c MAP phase sensing #3544
option to look for high and low peaks
2021-12-05 14:25:26 -05:00
rusefillc 0c91e77749 MAP phase sensing #3544
taking a step back to happy place
2021-12-04 18:21:10 -05:00
rusefillc 5f4b224b5f tune via CAN #3361
CAN testability
2021-12-04 01:01:48 -05:00
rusefillc 37183a0640 header style 2021-12-04 01:01:48 -05:00
Andrei c6fa50d196 CAN update 2021-12-03 21:44:15 -05:00
rusefillc c80a37503e trigger_adc helping simulator 2021-12-01 14:17:16 -05:00
rusefillc aaf732f738 trigger_adc unit tests 2021-12-01 13:35:44 -05:00
Andrei 1047fed77c trigger_adc unit-test data files 2021-12-01 12:28:48 -05:00
rusefillc 79e43384a5 proteus to have enlarged Lua 2021-11-30 21:37:17 -05:00
Matthew Kennedy a37c9bca9e
Remove the EFI_NO_CONFIG_WORKING_COPY option (#3630)
* no working copy

* oops
2021-11-29 16:44:45 -05:00
rusefillc 0c4e64fb2d Epic: Remove FSIO #2928 2021-11-28 17:54:26 -05:00
Matthew Kennedy d5363b814a
better VSS configuration (#3542)
* vss uses real values

* some defaults

* test and correct math

* km, not miles!

* comment

* tooltip

* that macro went away

* 100hz and default settings gives 9kph

* changelog

* order of operations safety

* make the test like the pwm test

* housekeeping

* this is why we need sensor automation

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-27 08:49:07 -05:00
GitHub build-unit-tests Action 7ea34947d5 Trigger wheel definitions 2021-11-26 02:09:34 +00:00
GitHub build-unit-tests Action 8d1231a588 Trigger wheel definitions 2021-11-25 23:54:51 +00:00
Andrey e2fa1af527 MAP phase sensing #3544 2021-11-24 22:36:36 -05:00
Andrey 58c0fb4539 MAP phase sensing #3544 2021-11-24 21:53:32 -05:00
Andrey 259e8744cb MAP phase sensing #3544 2021-11-24 21:53:16 -05:00
Matthew Kennedy 81fffe87b7
main relay doesn't use fsio (#3580)
* fuel pump

* s

* call correct callback

* more dead

* test adjustment

* don't overflow

* don't need separate function

* java

* give it a name

* generated

* generated

* add to generate script

* import *

* this is so cheap we don't need a flag

* main relay

* plumbing

* dead fsio stuff

* test it

* by 100%, we mean 99.98%
2021-11-24 07:47:51 -05:00
rusefillc c75291f415 live data for wastegate #3588
i want to persist state so no 'const' sorry
2021-11-23 15:52:43 -05:00
rusefillc 50ccf1fbea harley 2021-11-22 19:16:57 -05:00
Matthew Kennedy 3334a6963c
oh my god we've had no asserts (#3595) 2021-11-22 17:52:03 -05:00
rusefillc 42da5746f4 j1850 SAE crc8 Lua 2021-11-22 14:19:19 -05:00
rusefillc da68ff5ad6 j1850 SAE crc8 2021-11-22 14:03:52 -05:00
Scott Smith ba4a00d3bb
Drop SingleChannelStateSequence in favor of MultiChannelStateSequenceWithData (#3519)
* Drop SingleChannelStateSequence in favor of MultiChannelStateSequenceWithData

Most all the users were Multi* anyways, so just improve that:
1. Allow up to 8 waveforms to share one byte per timestamp.  It could be better but this is simple
   and gets most of the benefit.
2. Use a wrapper structure to handle reserving space for the arrays.  Makes the interface simpler
   and more rigid.  Also saves 4 bytes per Multi*.  Downside is access is now via -> and *,
   not . and (nothing).

Saves 224 bytes of BSS, 1832 bytes of RAM4/CCM, 952 bytes of TEXT, and 103 bytes of RODATA

* Instantiate a base_t to make debugging easier.
Also fixes crash on real firmware by using &m_base instead - LTO optimization issue?

* No magical templated StaticAlloc thingy.  Just virtual functions.
2021-11-21 04:56:07 -05:00
Matthew Kennedy 9a28e8d938
correctly compute engine revolution number (#3586)
* add param

* first revolution is revolution 0, not revolution 1

* would you look at that, we sync one rev quicker!

* changelog

* rpm value
2021-11-21 09:01:27 +03:00
Matthew Kennedy a342bee57e
rpm calculator refactoring, gm 24x test (#3585)
* data

* stub test

* use getTimeSinceSyncPoint

* s

* s

* no

* test

* stray ;

* those were 1/10 what they were supposed to be

* actually check something

* dead log line?
2021-11-20 14:59:02 +03:00
rusefillc bdc6340df7 only c++ because lua does some things asan doesn't like, but don't actually cause overruns. 2021-11-20 03:04:52 -05:00
Matthew Kennedy 754e832a7f
don't do things that don't work in clang (#3584)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-20 02:40:41 -05:00
Matthew Kennedy bb57a4b084
detect more overflows with asan (#3582)
* overflow detector

* type list dynamic allocate

* fix the buffer length

* comment

* pr fb

* sanitize sim

* fix sim sanitizer bug

* didn't mean to turn off optimization for sim

* asan can do that, if you turn it on!

* cleaning
2021-11-20 01:38:39 -05:00
rusefillc fcc2b780e9 On -fpermissive in Windows in unit tests fix #3581 2021-11-20 00:26:52 -05:00
rusefillc f1900b4887 On -fpermissive in Windows in unit tests #3581 2021-11-20 00:23:27 -05:00
rusefillc e54d3b9e06 On -fpermissive in Windows in unit tests #3581 2021-11-20 00:16:03 -05:00
Scott Smith 5bc1949aef
Basic framework for high pressure fuel pump control (#3476)
* Basic framework for high pressure fuel pump control

* Many changes

Move calculations to fast callback
Move main object into Engine
Respond to pin changes without requiring a reboot

* Use EngineModule for HpfpController
Schedule pin off after executing pin on so we are sure it ends, even if the motor stops.
Test scheduling.
Less RAM use by only having one event and reordering fields.

* Make scheduling test actually useful - need non-0 activation angle.

Co-authored-by: rusefillc <48498823+rusefillc@users.noreply.github.com>
2021-11-19 23:06:51 -05:00
Matthew Kennedy d40ca0f581
fuel pump doesn't use fsio (#3576)
* fuel pump

* s

* call correct callback

* more dead

* test adjustment

* don't overflow

* don't need separate function

* java

* give it a name

* generated

* generated

* add to generate script

* import *

* this is so cheap we don't need a flag
2021-11-19 22:23:12 -05:00
Matthew Kennedy cdd27abb09
turn on c++ 20 (#3579)
* set flags

* emit initializers

* jar
2021-11-19 22:19:34 -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