Commit Graph

7905 Commits

Author SHA1 Message Date
rusefillc 1dd3370b56 https://rusefi.com/forum/viewtopic.php?f=18&t=2236 2021-12-06 21:31:49 -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
GitHub build-firmware Action 17debda6b6 Auto-generated configs and docs 2021-12-07 01:25:03 +00:00
GitHub set-date Action feea6726ce Update date 2021-12-07 01:04:53 +00:00
GitHub build-firmware Action 6f9ad94d7b Auto-generated configs and docs 2021-12-07 00:05:13 +00:00
GitHub build-firmware Action 1c74ac44d5 Auto-generated configs and docs 2021-12-06 22:39:16 +00:00
rusefillc f826fe13aa MAP phase sensing #3544
trigger sync better gauges/logging
2021-12-06 17:04:05 -05:00
GitHub build-firmware Action 5a91b365f3 Auto-generated configs and docs 2021-12-06 18:35:35 +00:00
rusefillc 934b005acb trigger sync better gauges/logging 2021-12-06 13:08:41 -05:00
GitHub build-firmware Action a28651ba7a Auto-generated configs and docs 2021-12-06 05:48:26 +00:00
GitHub build-firmware Action 8fd9f82519 Auto-generated configs and docs 2021-12-06 02:28:13 +00:00
rusefillc dbb3de3618 tune via CAN #3361
pauseCANdueToSerial
2021-12-05 21:21:36 -05:00
GitHub set-date Action 9b9c06d5a1 Update date 2021-12-06 01:04:03 +00:00
GitHub build-firmware Action b0d7eeef8e Auto-generated configs and docs 2021-12-05 23:56:34 +00:00
Matthew Kennedy 7dc20b368a
Alternator controller is engine module (#3663)
* alternator is engine module

* user can't set pid period
2021-12-05 18:33:50 -05:00
GitHub build-firmware Action da890de9b3 Auto-generated configs and docs 2021-12-05 23:25:09 +00:00
GitHub build-firmware Action d9ea027fbd Auto-generated configs and docs 2021-12-05 19:42:45 +00:00
rusefillc 2f45ed205c MAP phase sensing #3544
option to look for high and low peaks
2021-12-05 14:25:26 -05:00
rusefillc 6384b12f48 lua is like a virus but not really 2021-12-05 14:25:26 -05:00
Matthew Kennedy 555a8d5f43
simplify cylinder phasing (#3650) 2021-12-05 10:46:35 -05:00
GitHub build-firmware Action c0605ab026 Auto-generated configs and docs 2021-12-05 03:35:58 +00:00
GitHub build-firmware Action 9a639fc0bc Auto-generated configs and docs 2021-12-05 03:19:16 +00:00
GitHub build-firmware Action 7ab14ca4c6 Auto-generated configs and docs 2021-12-05 00:28:26 +00:00
rusefillc 85da6d6ad1 MAP phase sensing #3544 2021-12-04 18:47:14 -05:00
rusefillc 0c91e77749 MAP phase sensing #3544
taking a step back to happy place
2021-12-04 18:21:10 -05:00
GitHub build-firmware Action ce32c26fa2 Auto-generated configs and docs 2021-12-04 23:06:32 +00:00
GitHub build-firmware Action fbd203fff2 Auto-generated configs and docs 2021-12-04 22:39:55 +00:00
rusefillc 004f28a60a MAP phase sensing #3544 2021-12-04 17:19:35 -05:00
rusefillc 45a95db67f MAP phase sensing #3544
trying longer average
2021-12-04 17:06:59 -05:00
rusefi 3bbcfeac59 helping master - undoing limp_manager change 2021-12-04 12:49:43 -05:00
rusefillc e407ae73df bringing code up-to-date 2021-12-04 12:18:52 -05:00
Andrei 170642977f fix engine stop for MAIN_RELAY_CONTROL 2021-12-04 11:55:03 -05:00
GitHub build-firmware Action 169c983283 Auto-generated configs and docs 2021-12-04 07:05:27 +00:00
Andrei 99daecb7c7 better ignition_voltage_detected message 2021-12-04 01:41:25 -05:00
GitHub build-firmware Action b321ac64be Auto-generated configs and docs 2021-12-04 06:33:12 +00:00
GitHub build-firmware Action e429f026f5 Auto-generated configs and docs 2021-12-04 06:08:52 +00:00
rusefillc 5f4b224b5f tune via CAN #3361
CAN testability
2021-12-04 01:01:48 -05:00
GitHub build-firmware Action 6f84ccbf77 Auto-generated configs and docs 2021-12-04 05:41:08 +00:00
rusefillc 33f3037eaa tune via CAN #3361 2021-12-04 00:33:54 -05:00
GitHub build-firmware Action f091b9a4e1 Auto-generated configs and docs 2021-12-04 05:10:01 +00:00
GitHub build-firmware Action ef765b6770 Auto-generated configs and docs 2021-12-04 03:31:31 +00:00
GitHub build-firmware Action 2afae264c6 Auto-generated configs and docs 2021-12-04 02:51:21 +00:00
Andrei c6fa50d196 CAN update 2021-12-03 21:44:15 -05:00
GitHub build-firmware Action 63a24ceda8 Auto-generated configs and docs 2021-12-04 02:14:41 +00:00
GitHub set-date Action 233551d31b Update date 2021-12-04 01:01:22 +00:00
GitHub build-firmware Action 5633053237 Auto-generated configs and docs 2021-12-03 15:14:27 +00:00
GitHub build-firmware Action 5e0d2ed891 Auto-generated configs and docs 2021-12-03 04:38:08 +00:00
GitHub build-firmware Action 3ee6d21c6d Auto-generated configs and docs 2021-12-03 03:45:48 +00:00
rusefillc 3a8e7e00f9 MAP phase sensing #3544 2021-12-02 22:32:07 -05:00
GitHub set-date Action 57dac128ad Update date 2021-12-03 01:11:52 +00:00
GitHub build-firmware Action dc45237830 Auto-generated configs and docs 2021-12-03 00:39:13 +00:00
Matthew Kennedy 25beb610b0
log actual tooth angle (#3646) 2021-12-02 19:22:33 -05:00
GitHub build-firmware Action 9313c7b3ed Auto-generated configs and docs 2021-12-02 22:42:07 +00:00
rusefillc fda7a3a775 Engine phase wrap around in log #3645
refactoring & docs
2021-12-02 17:06:20 -05:00
rusefillc e896afe2f6 Engine phase wrap around in log #3645
refactoring & docs
2021-12-02 17:06:20 -05:00
GitHub build-firmware Action c9aa40293c Auto-generated configs and docs 2021-12-02 06:56:04 +00:00
rusefillc 168a899ba9 how many more spelling mistakes?! 2021-12-02 01:06:40 -05:00
rusefillc f4ab23eb2b Requesting LUA Torque intervention #3638 2021-12-02 01:02:56 -05:00
GitHub build-firmware Action eee7a3a406 Auto-generated configs and docs 2021-12-02 05:29:18 +00:00
GitHub build-firmware Action 4392161ac9 Auto-generated configs and docs 2021-12-02 05:04:17 +00:00
rusefillc 56d52f01be refactoring 2021-12-01 23:33:26 -05:00
rusefillc bf98a53872 CAN progress 2021-12-01 22:57:21 -05:00
GitHub build-firmware Action f175393684 Auto-generated configs and docs 2021-12-02 02:59:01 +00:00
GitHub set-date Action 7056fd19ec Update date 2021-12-02 01:01:54 +00:00
rusefillc 0ce025b1f5 fix vBatt false-detection 2021-12-01 11:22:13 -05:00
GitHub build-firmware Action 040f68d4ec Auto-generated configs and docs 2021-12-01 14:21:38 +00:00
rusefillc c7db973434 proteus to have enlarged Lua 2021-12-01 09:06:16 -05:00
rusefillc ab34c8707f proteus to have enlarged Lua 2021-12-01 00:07:04 -05:00
GitHub build-firmware Action 4227e7afcb Auto-generated configs and docs 2021-12-01 04:23:33 +00:00
rusefillc 6d4b1e6020 proteus to have enlarged Lua
one step back
2021-11-30 22:35:29 -05:00
rusefillc c8b43e9c7a proteus to have enlarged Lua 2021-11-30 21:57:15 -05:00
GitHub build-firmware Action 6de2e59fb1 Auto-generated configs and docs 2021-12-01 02:00:42 +00:00
GitHub set-date Action 3d04e5b260 Update date 2021-12-01 01:08:34 +00:00
GitHub build-firmware Action 36fb3c195d Auto-generated configs and docs 2021-12-01 00:36:32 +00:00
Matthew Kennedy 890cbd8cf2
remove define_constructor (#3640)
* no define_constructor

* jar

* sim needs live doc
2021-11-30 19:31:54 -05:00
GitHub build-firmware Action 4f2b50b8d4 Auto-generated configs and docs 2021-11-30 22:57:09 +00:00
GitHub build-firmware Action 6219679d77 Auto-generated configs and docs 2021-11-30 21:40:56 +00:00
GitHub set-date Action 9be4bc307b Update date 2021-11-30 01:01:31 +00:00
GitHub build-firmware Action 59ad7d73e9 Auto-generated configs and docs 2021-11-29 22:53:01 +00: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 e75590fd45 why so many channels are hidden in debug ? #3614 2021-11-29 14:11:19 -05:00
GitHub build-firmware Action 76477bbd46 Auto-generated configs and docs 2021-11-29 17:54:58 +00:00
GitHub build-firmware Action 061a5f7fed Auto-generated configs and docs 2021-11-29 17:35:56 +00:00
rusefillc 89f92e1694 why so many channels are hidden in debug ? #3614 2021-11-29 11:54:55 -05:00
GitHub build-firmware Action d5ec983f55 Auto-generated configs and docs 2021-11-29 16:49:40 +00:00
GitHub build-firmware Action 8913746065 Auto-generated configs and docs 2021-11-29 16:10:44 +00:00
rusefillc 11e81cfb57 why so many channels are hidden in debug ? #3614 2021-11-29 10:44:41 -05:00
rusefillc 818d12f68e why so many channels are hidden in debug ? #3614 2021-11-29 10:16:45 -05:00
rusefillc de0680209b why so many channels are hidden in debug ? #3614 2021-11-29 10:15:28 -05:00
GitHub build-firmware Action 81f4a3e5f0 Auto-generated configs and docs 2021-11-29 06:58:09 +00:00
rusefillc 67af7470d7 why so many channels are hidden in debug ? #3614 2021-11-29 01:13:04 -05:00
rusefillc 26997ab9e3 why so many channels are hidden in debug ? #3614 2021-11-29 01:02:40 -05:00
GitHub build-firmware Action f61f3e2834 Auto-generated configs and docs 2021-11-29 06:00:58 +00:00
GitHub build-firmware Action 247a772f7f Auto-generated configs and docs 2021-11-29 05:41:48 +00:00
GitHub build-firmware Action b466f82af1 Auto-generated configs and docs 2021-11-29 04:25:09 +00:00
GitHub build-firmware Action d0fc494aa1 Auto-generated configs and docs 2021-11-29 02:00:43 +00:00
GitHub set-date Action 9adf540d12 Update date 2021-11-29 01:03:05 +00:00
GitHub build-firmware Action 0ed6784f93 Auto-generated configs and docs 2021-11-28 23:53:55 +00:00
rusefillc d89e269567 Epic: Remove FSIO #2928 2021-11-28 17:47:16 -05:00
rusefillc 82397f149e Epic: Remove FSIO #2928 2021-11-28 17:31:38 -05:00
GitHub build-firmware Action b73316f3a4 Auto-generated configs and docs 2021-11-28 22:26:50 +00:00
GitHub build-firmware Action 3fae399b7c Auto-generated configs and docs 2021-11-28 21:41:29 +00:00
GitHub build-firmware Action cc3c4bca0e Auto-generated configs and docs 2021-11-28 21:26:05 +00:00
GitHub build-firmware Action 78963680bd Auto-generated configs and docs 2021-11-28 20:53:00 +00:00
GitHub build-firmware Action 262beffbeb Auto-generated configs and docs 2021-11-28 20:32:19 +00:00
Matthew Kennedy a071e2a168
verbose CAN bits picker (#3628)
* verbose bits picker

* s
2021-11-28 14:59:26 -05:00
GitHub build-firmware Action 0c578dde4a Auto-generated configs and docs 2021-11-28 19:46:47 +00:00
GitHub build-firmware Action a0c69408ca Auto-generated configs and docs 2021-11-28 19:18:32 +00:00
GitHub build-firmware Action 99716d83a9 Auto-generated configs and docs 2021-11-28 18:22:48 +00:00
GitHub build-firmware Action 2e97642dae Auto-generated configs and docs 2021-11-28 05:54:31 +00:00
Matthew Kennedy b8660db35e
make fan control live-data-friendly (#3626)
* make fan live-data-friendly

* script

* generated for happy simulator
2021-11-28 00:40:12 -05:00
GitHub set-date Action b7e8dbc137 Update date 2021-11-28 01:01:58 +00:00
GitHub build-firmware Action 6ac700c7cd Auto-generated configs and docs 2021-11-28 00:44:50 +00:00
Matthew Kennedy 71aff73081
not industrial (#3627) 2021-11-27 19:27:57 -05:00
GitHub build-firmware Action 026b0a344d Auto-generated configs and docs 2021-11-27 23:40:21 +00:00
GitHub build-firmware Action 785ca1b828 Auto-generated configs and docs 2021-11-27 19:21:04 +00:00
GitHub build-firmware Action 7b1b611559 Auto-generated configs and docs 2021-11-27 18:42:03 +00:00
rusefillc edb10af9f4 automation around outputs section #197 2021-11-27 13:36:37 -05:00
GitHub build-firmware Action eacba66f80 Auto-generated configs and docs 2021-11-27 18:23:12 +00:00
GitHub build-firmware Action bcf4a8c67c Auto-generated configs and docs 2021-11-27 17:44:20 +00:00
GitHub build-firmware Action e41a9ab7b0 Auto-generated configs and docs 2021-11-27 16:00:49 +00:00
GitHub build-firmware Action 43cda35d79 Auto-generated configs and docs 2021-11-27 14:01:08 +00: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-firmware Action 08d85b5dfd Auto-generated configs and docs 2021-11-27 06:18:39 +00:00
GitHub build-firmware Action 7f3658bf71 Auto-generated configs and docs 2021-11-27 06:02:00 +00:00
GitHub build-firmware Action 6c62fdbdda Auto-generated configs and docs 2021-11-27 03:40:13 +00:00
rusefillc 6ff42cc031 automation around outputs section #197 2021-11-26 20:46:42 -05:00
GitHub set-date Action 973a4a24fb Update date 2021-11-27 00:58:56 +00:00
Matthew Kennedy 5eea2764f5
strtof (#3623)
* strtof

* do fewer divides
2021-11-26 18:39:45 -05:00
rusefillc e70f862f62 first edition 2021-11-26 16:02:21 -05:00
rusefillc 5c0795f034 random note 2021-11-26 15:48:42 -05:00
rusefillc 4b8c5f1671 harley 2021-11-26 14:41:35 -05:00
rusefillc bdde177e04 skipspark script kills ECU fix #3611 2021-11-25 22:40:19 -05:00
GitHub build-firmware Action c0d3de4128 Auto-generated configs and docs 2021-11-26 02:06:11 +00:00
Andrey 0ec8b8d46c reliable 32/2 trigger shape 2021-11-25 20:45:58 -05:00
GitHub build-firmware Action d8cb7b8059 Auto-generated configs and docs 2021-11-26 01:23:28 +00:00
GitHub set-date Action b5f3c1d6a2 Update date 2021-11-26 00:59:36 +00:00
GitHub build-firmware Action 4f101697a2 Auto-generated configs and docs 2021-11-25 23:51:06 +00:00
Matthew Kennedy f8403543d6
wall fuel tweaks (#3617) 2021-11-25 18:45:44 -05:00
Matthew Kennedy 0badb6b2ff
AC is EngineModule (#3604)
* AC is engine module

* missed a spot with main relay while we're at it

* TS
2021-11-25 07:59:31 -05:00
Andrey 12d5106614 isCylinderCleanupEnabled would be nice by default 2021-11-24 23:32:55 -05:00
Andrey 48ed80ffb9 MAP phase sensing #3544 2021-11-24 23:06:52 -05:00
Andrey 228d5ee810 MAP phase sensing #3544 2021-11-24 22:41:49 -05:00
Andrey e2fa1af527 MAP phase sensing #3544 2021-11-24 22:36:36 -05:00
Andrey f1b8acb1fd MAP phase sensing #3544 2021-11-24 22:35:56 -05:00
Andrey c2fa1cea78 minor progress 2021-11-24 22:35:56 -05:00
GitHub build-firmware Action d205bf7635 Auto-generated configs and docs 2021-11-25 03:31:35 +00:00
Matthew Kennedy 992689ced5
bye (#3609) 2021-11-24 22:03:17 -05:00
GitHub build-firmware Action 26709493e1 Auto-generated configs and docs 2021-11-25 02:45:07 +00:00
GitHub set-date Action ac4231a5b3 Update date 2021-11-25 01:01:18 +00:00
Matthew Kennedy bc1c2e78fd
fix map avg logging (#3606)
* s

* s
2021-11-24 18:24:39 -05:00
rusefi 91544f7658 live data for wastegate #3588 2021-11-24 15:22:10 -05:00
rusefi 8ed3020c07 live data for wastegate #3588 2021-11-24 15:07:48 -05:00
rusefi 4dad940160 live data for wastegate #3588 2021-11-24 15:03:06 -05:00
GitHub build-firmware Action fbdcca54a1 Auto-generated configs and docs 2021-11-24 19:48:08 +00:00
Matthew Kennedy 09bf989995
map averaging usability (#3603) 2021-11-24 14:39:54 -05:00
GitHub build-firmware Action ffe525c160 Auto-generated configs and docs 2021-11-24 19:31:50 +00:00
rusefillc 446252d77d MAP phase sensing #3544 2021-11-24 14:26:41 -05:00
GitHub build-firmware Action c46cf51dc5 Auto-generated configs and docs 2021-11-24 19:10:22 +00:00
rusefillc 284fea286b live data for wastegate #3588 2021-11-24 13:20:47 -05:00
rusefillc 3ac46c98f2 live data for wastegate #3588 2021-11-24 13:18:07 -05:00
rusefillc 3077f795c4 live data for wastegate #3588 2021-11-24 12:59:57 -05:00
GitHub build-firmware Action bfdbf70c07 Auto-generated configs and docs 2021-11-24 13:02:01 +00: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
GitHub set-date Action e59ee8deef Update date 2021-11-24 01:00:22 +00:00
GitHub build-firmware Action 25d175b47a Auto-generated configs and docs 2021-11-23 21:48:05 +00:00
rusefillc 794ec5e2b8 well Lua wants to be BIG 2021-11-23 16:40:04 -05:00
GitHub build-firmware Action 7287d41467 Auto-generated configs and docs 2021-11-23 21:00:29 +00: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 ca1e420073 live data for wastegate #3588 2021-11-23 15:51:30 -05:00
rusefillc 719e3f9052 LUA CANbus expect 29bit ID by default #3592
not great quick fix
2021-11-23 15:41:43 -05:00
GitHub build-firmware Action a4557c969f Auto-generated configs and docs 2021-11-23 20:06:24 +00:00
rusefillc d21541934d live data for wastegate #3588 2021-11-23 15:02:03 -05:00
rusefillc ead3853f9a live data for wastegate #3588 2021-11-23 15:00:47 -05:00
rusefillc c29bb71556 spelling 2021-11-23 07:57:43 -05:00
GitHub set-date Action ad5c0fc57c Update date 2021-11-23 01:00:35 +00:00
GitHub build-firmware Action 174b03e8be Auto-generated configs and docs 2021-11-22 23:12:52 +00: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
GitHub build-firmware Action 66e9a5e9ae Auto-generated configs and docs 2021-11-22 18:42:24 +00:00
rusefillc a369e7e3d3 unusedLogFormat 2021-11-22 13:37:06 -05:00
Scott Smith 9668626008
Move LuaThread to CCM, and shuffle a couple items out. (#3587)
Lua's stack probably doesn't need DMA.  Allows us to group more of our unused RAM together
in one place.
2021-11-21 20:35:03 -05:00
GitHub set-date Action cd08e2d153 Update date 2021-11-22 01:01:34 +00:00
GitHub build-firmware Action 62e11e18e4 Auto-generated configs and docs 2021-11-21 13:16:25 +00: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
GitHub set-date Action 3b818a9585 Update date 2021-11-21 01:02:55 +00: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
Scott Smith cbc7c61b3e
Fix potential buffer overrun in cyclic_buffer. (#3583)
This exposed a buffer overrun, so double the size of the buffer (to account for 720 degree engine
cycle vs 360 degree crank events).

Also use proper numeric limits when computing min/max.
Finally, add a lock around the call to cyclic_buffer that actually caused the contention.
2021-11-20 03:01:11 -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 e54d3b9e06 On -fpermissive in Windows in unit tests #3581 2021-11-20 00:16:03 -05:00
rusefillc ecac07f938 brave refactoring 2021-11-19 23:56:52 -05:00
GitHub build-firmware Action 71bf1f7d1a Auto-generated configs and docs 2021-11-20 04:16:43 +00: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
GitHub build-firmware Action f8f52c4c1f Auto-generated configs and docs 2021-11-20 03:34:23 +00: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
GitHub set-date Action 3288f42fbf Update date 2021-11-20 00:59:29 +00:00
GitHub build-firmware Action 0b4ca8346b Auto-generated configs and docs 2021-11-19 12:08:29 +00:00
rusefillc 684622e476 debug mode for skipped count for 4 cylinders #3570 2021-11-19 07:02:21 -05:00
Matthew Kennedy 29613ec403
fast exti interrupt handoff (#3497)
* fast exti

* test code snuck in

* full interrupt disable :(

* do it the old fashioned way

* enable interrupt

* consume stored timestamp

* dead

* h7 maybe

* guard maybe

* non-stm32

* exti 16 wrong on f4/f7

* CORTEX_MAXIMUM_PRIORITY

* safer but uglier

* s

* chibios

* no const

* initializers

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-19 06:37:52 -05:00
GitHub build-firmware Action f76054c0b3 Auto-generated configs and docs 2021-11-19 09:16:06 +00:00
Matthew Kennedy caee2a5439
delimeter is not comma (#3533)
* delimeter is not comma

* do it in config txt

* use txt

* s

* string

* compat

* also, spelling is hard

* use new name

* use new name

* generate enough for happy console

* use an even less common character

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-19 12:01:45 +03:00
Matthew Kennedy 692e3d7e9f
adjust miata sync conditions (#3577) 2021-11-19 02:30:05 -05:00
GitHub set-date Action 90fc972716 Update date 2021-11-19 01:01:05 +00: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
rusefillc 877535b8ff proportional spark cut #3427 2021-11-17 23:35:26 -05:00
GitHub build-firmware Action bd57251977 Auto-generated configs and docs 2021-11-18 04:30:54 +00:00
Scott Smith 98040ad9af
Make the module API more concise. (#3571)
engineModules.get<FOO>(). becomes modules<FOO>()->

I believe the new API is more conducive to supporting arrays, by doing std::array<T, N> or
std::array<Mockable<T>, N>, with the support of a helper class.
2021-11-17 21:50:00 -05:00
Scott Smith ba8bd0a704
Add a lock for scheduleOrQueue events. (#3572)
Ignition callers are all tooth based, but aux valves calls it from both the microsecond timer and
the main initialization thread.  HPFP will also soon call it from both those places too.
2021-11-18 05:08:32 +03:00
GitHub set-date Action 8ad9a169ef Update date 2021-11-18 01:00:51 +00: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 988aacdd91
Create a base class EngineModule for that contains various useful callbacks. (#3548)
* Create a base class EngineModule for that contains various useful callbacks.

This cleans up the API by not requiring the notifiers to know about who wants callbacks.  The only
place you need to update to add a module is in one place.

* Add mockability.

* Convert InjectorModel to a Mockable EngineModule
2021-11-17 20:13:19 +03:00
rusefillc b579b33082 Startup Pin State Error - maybe hardware damage of STM32 pin connected to a 12v-powered TC4427? #3558 2021-11-17 04:45:55 -05:00
rusefillc d688f72c3e proportional spark cut #3427 2021-11-17 04:06:22 -05:00
Scott Smith 823d9a07e0
Programmatically replace ENGINE() and CONFIG() with engine-> etc (#3565)
git grep -l -w ENGINE | xargs sed -i -r "s/ENGINE\(([]a-zA-Z_0-9.[]+)\)/engine->\1/g"

git grep -l -w CONFIG | xargs sed -i -r "s/([^a-zA-Z_])CONFIG\(([]a-zA-Z_0-9.[]+)\)/\1engineConfiguration->\2/g"
2021-11-17 03:54:21 -05:00
Scott Smith 70ad9724c0
Make engine* and friends be const pointers in production. (#3564)
This allows the compiler to see through the pointer and make accesses faster.
It saves 1336 bytes of text.
2021-11-17 03:53:17 -05:00
Scott Smith 8dbdeb7773
Remove a bunch of macros from engine_ptr.h (#3562) 2021-11-17 10:01:39 +03:00
GitHub set-date Action 5b1f6dd4b1 Update date 2021-11-17 01:00:29 +00: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
rusefillc 17d4646dce spelling 2021-11-16 16:46:54 -05:00
rusefillc dad00adc28 helping launch enter simulator 2021-11-16 16:45:14 -05:00
rusefillc 678a756275 helping launch enter simulator 2021-11-16 16:31:35 -05:00
Andrey a61043e570 proportional spark cut #3427 2021-11-16 13:23:08 -05:00
Andrey 3748bf5ad0 proportional spark cut #3427 2021-11-16 05:56:15 -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
Scott Smith 62daac73c7
Use Valgrind to detect unitialized variable references. (#3555)
* Use Valgrind to detect unitialized variable references.

Fix the edge cases that pop up

* Comment and disable Mac run
2021-11-15 23:42:23 -05:00
GitHub build-firmware Action 4ed25bff52 Auto-generated configs and docs 2021-11-16 02:53:15 +00:00
Andrey 0cc88ec6e2 Not all launch control options are used #3554 2021-11-15 21:13:01 -05:00
Andrey 3b0825181c technical debt: enableOverdwellProtection #3553
only documentation
2021-11-15 20:32:25 -05:00
Andrey 655b77dc3f random refactoring: trigger central encapsulation 2021-11-15 20:22:05 -05:00
Andrey 928c673695 refactoring launch 2021-11-15 20:09:03 -05:00
Andrey 05fa6071dd refactoring launch 2021-11-15 19:55:04 -05:00
Andrey 0d5df34f36 refactoring launch 2021-11-15 19:55:04 -05:00
Andrey c18204325c refactoring launch 2021-11-15 19:34:42 -05:00
Andrey f510cb8b29 refactoring launch 2021-11-15 19:24:00 -05:00
Andrey 4002c92dcc refactoring launch 2021-11-15 18:57:12 -05:00
Andrey 34015eceee refactoring launch 2021-11-15 14:40:35 -05:00
Matthew Kennedy cb032fb1ea
(void) -> () (#3550)
* static functions with (void)

* more

* Revert "more"

This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-15 13:02:34 +01:00
Matthew Kennedy 145316c497
less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
GitHub build-firmware Action adbb32e9b6 Auto-generated configs and docs 2021-11-15 03:03:29 +00:00
rusefillc 6f3eea31c6 MAP phase sensing #3544 2021-11-14 21:58:01 -05:00
GitHub build-firmware Action f3f9cb3f6c Auto-generated configs and docs 2021-11-15 02:31:36 +00:00
rusefillc 0722d6280d MAP phase sensing #3544 2021-11-14 21:24:59 -05:00
GitHub set-date Action e07987a601 Update date 2021-11-15 01:00:10 +00:00
GitHub build-firmware Action e776e2b3fb Auto-generated configs and docs 2021-11-14 23:09:53 +00:00
rusefi c8d666c5a1 Lua: changing "table" API 2021-11-14 16:29:46 -05:00
rusefi 377c9e2fda Something something Automatic Compression Release #3442 2021-11-14 16:04:44 -05:00
rusefillc 0813266ee1 trigger refactoring & docs 2021-11-14 15:35:11 -05:00
Matthew Kennedy a7ba539e70
math is fun (#3545)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-14 15:32:35 -05:00
rusefi e8aebc313a Something something Automatic Compression Release #3442 2021-11-14 15:04:10 -05:00
rusefi cdeeb6f966 Epic: Remove FSIO #2928 2021-11-14 14:44:52 -05:00
GitHub build-firmware Action 1806c9876b Auto-generated configs and docs 2021-11-14 19:42:17 +00:00
rusefi 89ab20c35c Epic: Remove FSIO #2928 2021-11-14 14:14:43 -05:00
rusefillc 14c0711011 script settings need names! 2021-11-14 13:18:11 -05:00
GitHub build-firmware Action d69b742bce Auto-generated configs and docs 2021-11-14 17:42:11 +00:00
GitHub build-firmware Action 391218b562 Auto-generated configs and docs 2021-11-14 16:51:07 +00:00
rusefillc 074e85b523 Epic: Remove FSIO #2928 2021-11-14 11:40:19 -05:00
rusefillc 68ebb8045d Epic: Remove FSIO #2928 2021-11-14 11:04:51 -05:00
rusefillc 22c872d8d8 Epic: Remove FSIO #2928 2021-11-14 10:57:19 -05:00
GitHub build-firmware Action 402f2a3f93 Auto-generated configs and docs 2021-11-14 15:53:06 +00:00
rusefillc c22215cea7 Epic: Remove FSIO #2928 2021-11-14 10:39:47 -05:00
GitHub build-firmware Action aa3fc55c8e Auto-generated configs and docs 2021-11-14 15:07:50 +00:00
rusefi 0ea0d601a5 Epic: Remove FSIO #2928 2021-11-14 09:49:02 -05:00
GitHub build-firmware Action 98a4aa86d3 Auto-generated configs and docs 2021-11-14 14:40:23 +00:00
GitHub build-firmware Action 0a9674aa94 Auto-generated configs and docs 2021-11-14 14:27:16 +00:00
rusefillc eb1af46655 Epic: Remove FSIO #2928 2021-11-14 08:37:50 -05:00
rusefillc 991d0c5001 Epic: Remove FSIO #2928 2021-11-14 08:33:19 -05:00
GitHub build-firmware Action d299cc9c9b Auto-generated configs and docs 2021-11-14 13:13:06 +00:00
rusefillc a85d1bb064 Epic: Remove FSIO #2928 2021-11-14 07:30:26 -05:00
rusefillc 0a9682c553 Epic: Remove FSIO #2928 2021-11-14 07:24:50 -05:00
rusefillc 6210eaacf7 script settings need names! 2021-11-13 23:10:38 -05:00
GitHub build-firmware Action 13d19653e9 Auto-generated configs and docs 2021-11-14 03:54:30 +00:00
rusefillc a9bcce88d0 script settings need names! 2021-11-13 22:47:46 -05:00
GitHub build-firmware Action b295511600 Auto-generated configs and docs 2021-11-14 03:02:10 +00:00
Matthew Kennedy d591a5ad26
mercedes two lobe trigger testing (#3543)
* mercedes

* config

* break;

* I did the gap ratio math wrong

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-13 21:50:04 -05:00
GitHub set-date Action 19a119e5fc Update date 2021-11-14 01:02:27 +00:00
GitHub build-firmware Action e32673dfb6 Auto-generated configs and docs 2021-11-13 15:38:11 +00:00
rusefi 676f2dfb93 findTableIndex 2021-11-13 10:02:01 -05:00
rusefillc 6be84c0de9 lua can 2021-11-13 08:23:44 -05:00
rusefillc 8fdf2521e5 lua can 2021-11-13 08:20:30 -05:00
rusefillc e662544919 lua can 2021-11-13 04:44:17 -05:00
GitHub build-firmware Action 8d7157ff3e Auto-generated configs and docs 2021-11-13 09:41:01 +00:00
rusefillc 8333234737 Something something Automatic Compression Release #3442 2021-11-13 04:24:53 -05:00
Matthew Kennedy 73b05d2e20
lua pid class (#3411)
* lua pid

* no luaaa stl

* update luaaa

* finality

* luaaa

* luaaa

* = default

* bad merge

* gitmodules

* lua

* proteus demo script

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-13 03:18:16 -05:00
Matthew Kennedy a831bec797
update luaaa (#3540)
* lua update

* no stdlib mode

* turn off system luaaa for now since it makes luaaa sad

* let user heap do a little

* gitmodules

* memory shuffling

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-12 22:10:05 -05:00
GitHub build-firmware Action dffab7abff Auto-generated configs and docs 2021-11-13 03:01:55 +00:00
rusefillc 6d58518fb2 Proteus Harley 2021-11-12 21:56:07 -05:00
GitHub set-date Action e3a3bd6b7a Update date 2021-11-13 01:04:13 +00:00
GitHub build-firmware Action aae236188c Auto-generated configs and docs 2021-11-12 04:15:01 +00:00
GitHub build-firmware Action bcdea6b33a Auto-generated configs and docs 2021-11-12 04:00:30 +00:00
GitHub build-firmware Action 0c8f9dd01d Auto-generated configs and docs 2021-11-12 03:51:31 +00:00
Andrey 88dcab9cd6 Something something Automatic Compression Release #3442 2021-11-11 21:38:49 -05:00
Andrey 5c99178eeb docs 2021-11-11 21:31:24 -05:00
GitHub build-firmware Action 2765d386b9 Auto-generated configs and docs 2021-11-12 01:54:56 +00:00
Andrey 562ab174d7 Bench Test IAC Valve fails #3534
that's not even funny
2021-11-11 20:39:01 -05:00
Andrey 8d154b94df Bench Test IAC Valve fails #3534 2021-11-11 20:31:46 -05:00
Andrey df98eb69d4 Bench Test IAC Valve fails #3534 2021-11-11 20:28:01 -05:00
GitHub build-firmware Action 9861ca4d99 Auto-generated configs and docs 2021-11-12 01:22:13 +00:00
Andrey cd57e1fdb6 Something something Automatic Compression Release #3442 2021-11-11 20:16:46 -05:00