Commit Graph

457 Commits

Author SHA1 Message Date
Matthew Kennedy 774f4416a7 constexpr-ify log field list (#2548)
* constexprify

* reclaim ram

* more constexpr

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-13 20:16:18 -04:00
Matthew Kennedy d7e95cd31f improve sensor chart flush behavior (#2545)
* disable sensor chart

* type signature, guards

* we can't log the message as that confuses the parser

* dead

* this syntax was technically illegal

* more

* turn it back on

* remove config

* api

* implement

* ui

* java ui
2021-04-12 14:05:52 -04:00
rusefillc 8080f3bde7 helping us trace CUSTOM_INTEPOLATE_ERROR 2021-04-08 16:14:06 -04:00
Matthew Kennedy ce142907a0 replace print/printMsg with scheduleMsg (#2497)
* start cleaning

* disabled feature means don't print that it's disabled

* cli

* usages

* printMsg -> scheduleMsg

* this is alllll dead now

* no crlf please

* all hope is lost if you manage to hit this line

* tests

* tests

* ok we did actually need that part

* sim

* d

* kinetis

* it did ifdef, not if

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-26 17:23:26 -04:00
Matthew Kennedy 5e6746c3aa Implement nonlinear fuel level sender (#2473)
* table function

* config fields

* sensor type

* switch consumers

* init the sensor

* ui

* 1mv resolution

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-19 08:39:08 -04:00
Matthew Kennedy a26002bc02 type signature, guards 2021-03-15 17:11:11 -04:00
rusefillc 3651883bcf test_timer 2021-03-12 00:43:48 -05:00
Matthew Kennedy 943e6078c8 logging cleanup before refactor (#2438)
* minor cleanup

* more cleaning

* signature

* spelling

* doy
2021-03-09 08:43:29 -05:00
Matthew Kennedy ff5bf3e3c3 error accumulator (#2434)
* error accumulator

* makefile
2021-03-08 07:40:46 -05:00
Matthew Kennedy abdce83190 virtual zero timer (#2426)
* virtual zero timer

* it would help to call the correct function

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-07 15:32:41 -05:00
Matthew Kennedy dbebc353a2 remove unused msg parameter (#2360)
* dead parameter

* last few
2021-02-16 09:32:16 -05:00
Matthew Kennedy ace0f4e78c Add fallback map table (#2248)
* table

* sd math

* config

* debug channel name

* ptr vs not ptr

* actually use return value

* memory

* less magic
2021-01-31 17:19:06 -05:00
Matthew Kennedy b32e9ecb4a templated interpolate2d (#2221)
* template table2d

* assertions

* oops

* tests

* test bins too

* more assert

* format

* explicitly handle and test NaN

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-11 08:00:15 -05:00
Matthew Kennedy b4c5c2dfef update biquad (#2201) 2021-01-08 19:48:56 -05:00
rusefillc fea596e867 RAM efficiency of VR crank trigger shapes #2182
Audi OEM 5-cyl trigger pattern aka "Tri-Tach" https://rusefi.com/forum/viewtopic.php?f=5&t=1912

fixing build?
2021-01-04 22:13:59 -05:00
rusefillc da8c1a3ed4 Audi OEM 5-cyl trigger pattern aka "Tri-Tach" https://rusefi.com/forum/viewtopic.php?f=5&t=1912 2021-01-04 21:05:16 -05:00
Matthew Kennedy 9e384a08a2 simplify confirmation (#2131) 2020-12-24 16:54:22 -05:00
Matthew Kennedy 8c1ce68903 handle negative timer delta (#2110) 2020-12-21 06:16:58 -05:00
rusefillc 9b7acb9dbf clang warnings again #2055 2020-12-11 12:50:10 -05:00
Matthew Kennedy 622021e799 switch rpm calculator to use timer class (#2005)
* add api

* rpm calculator

* fix fsio

* fix float

* remove wrong comment

* fix timer

* clang didn't like this

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-06 16:01:45 -05:00
Matthew Kennedy a806053d52 round rpm instead of truncating (#2023)
* round rpm instead of truncating

* efiround is expensive

* Revert "efiround is expensive"

This reverts commit e5690f89e1b1988aacf5ced1f024d576465a7cd6.

* round is better than rintf

* testing

* it works now?!

* comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-06 00:11:57 -05:00
rusefillc a1fe39b89d unit tests in clang #2012 2020-12-04 23:59:21 -05:00
Matthew Kennedy bb2208fb52 add timer since last trigger tooth (#2004)
* add elapsed time to timer

* store trigger time

* fsio method

* don't do a 64b divide

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-03 11:13:45 -05:00
rusefillc 16f4aa0281 Avoid float -> int64 conversion #1993 2020-12-03 10:31:16 -05:00
rusefillc cf77902193 Avoid float -> int64 conversion #1993 2020-12-03 10:26:50 -05:00
Matthew Kennedy c5295f520e timer (#1994) 2020-11-30 19:35:06 -05:00
rusefillc 315bfe6531 avoid float -> int64 conversion #1977
cherry picking...
2020-11-23 23:33:46 -05:00
Matthew Kennedy 8eaae30bca fix #1968 (#1976)
* tanf

* name

* comment, add test
2020-11-22 08:26:17 -05:00
Matthew Kennedy 2792828dce Remove lockAnyContext, replace with CriticalSectionLocker (#1938)
* switch to CriticalSectionLocker

* that's just about all

* clean up last usage

* include hpp for sim

* need the cpp wrappers in the makefile too

* include dir

* include
2020-11-19 06:56:02 -05:00
rusefillc c30d0d31f3 Starter seems to be engaged forever #1965 2020-11-18 19:51:51 -05:00
Matthew Kennedy 786aaf2e3c put getTimeNowLowerNt in to mpu_util (#1950)
* put getTimeNowLowerNt in to mpu_util

* move GPTDEVICE to port_mpu_util

* and remove from efifeatures
2020-11-18 14:17:00 -05:00
Matthew Kennedy b8c2041467 Everything in lambda! (#1893)
* lambda

* default configs, fix build

* config, gauge, UI

* more digits

* change menu text

* fix that while I'm here

* doesn't need extra word

* todo note

* tests

* last test

* missed a config

* update java

* store target lambda

* more java

* format

* hopefully enough java for CI to pass
2020-10-26 18:15:17 -04:00
Matthew Kennedy dbdeca93b0 implement fuel pressure sensors (#1897)
* add

* remove old

* remove more old

* makefile

* fix init

* patch up other stuff

* actually fix it this time

* raw output channels

* gauges, UI

* scaled channel

* fix field ordering
2020-10-23 07:31:47 -04:00
Andrey G 4c074fb9c8 common.h: define MIN and MAX macro only if nod defined yet (#1896)
This fix compilation error for Kinetis and Cypress if common.h
is included after platform includes which also defines MIN MAX.
2020-10-22 08:41:44 -04:00
rusefi 4af1bad726 progress 2020-10-22 00:57:11 -04:00
Matthew Kennedy 94bd5921c5 simplify getTimeNowNt() (#1876)
* remove old impl

* add cpp wrapper to os_access

* clean up os_access

* remove touchTimeCounter

* new impl

* put comment about lock free impl

* include cpp wrappers for BL

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-10-15 08:57:13 -04:00
rusefi 6fe1f18067 Trigger sync lost every 2^32 CPU cycles #1873
only a random code comment
2020-10-11 18:17:30 -04:00
Matthew Kennedy 3e64861c14 display base fuel mass in milligrams (#1838)
* switch to mg

* use the correct thing

* gauge scaling

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-09-30 20:19:51 -04:00
Matthew Kennedy 36234961c1 logging simplification: switch bare functions to member functions: try the second (#1794)
* first pass

* first pass

* const means we don't have to check!

* static

* test fixup

* fix sniffer
2020-09-13 11:49:25 +03:00
rusefi ead14bd1ca Revert "logging simplification: switch bare functions to member functions (#1788)"
This reverts commit 39280fb2
2020-09-12 04:36:24 -04:00
Matthew Kennedy 39280fb2c6 logging simplification: switch bare functions to member functions (#1788)
* first pass

* first pass

* const means we don't have to check!

* static

* test fixup
2020-09-12 03:08:11 +03:00
Matthew Kennedy fd9cf0feae define map3d functions in class (#1785)
* define in class

* don't keep an extra flag
2020-09-10 22:03:16 -04:00
Matthew Kennedy 8079e5f292 scale tables using type system (#1776)
* store scale in the type

* efi ratio

* boost control scaling

* fix boost tests
2020-09-10 18:44:10 -04:00
rusefi e3929978bc Hellen says cyclic buffer 2020-09-07 11:35:02 -04:00
rusefi 7df2666d7b helping Kinetis? 2020-09-06 23:17:13 -04:00
rusefi 8ba9a47c59 microRusEFI used as Body Control Module BCM BCU
got stack too low warning with DBG_CAN
2020-09-06 21:45:17 -04:00
Matthew Kennedy 5213037237 fix expected (#1754) 2020-09-03 14:56:55 -04:00
Matthew Kennedy 1b07647e72 Software knock detection (#1730)
* s

* science

* set pin mode

* turn stuff off so it fits

* filtering maybe

* filtering actually works

* generate filter parameters internally

* shorter window

* guard behind enable flag

* use checked in filter

* add biquad reset

* tracing

* const

* exec order

* do it from a thread

* smaller buffer, comment

* configure with header

* only for proteus

* oops

* unused

* not needed

* guards

* pin config

* don't need that include

* precook filter steady state

* define sample rate

* config enable switch
2020-08-28 21:13:50 -04:00
Matthew Kennedy 8ab4c5c765 Analog input filtering (#1680)
* improve biquad

* cleanup

* add filtering to subscriptions

* config sensors

* comment

* doesn't need to be that fast

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-08-21 19:47:12 -04:00
Matthew Kennedy ad42a17207 Configurable stoichiometric ratio (#1710)
* configurable stoich ratio

* afr table always in gas afr

* default

* typo

* use defined ratio

* do it in config too

* missed a spot

* oops wrong one

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-08-21 19:43:30 -04:00
rusefi 8d0f47b940 TS SD integration #1653 2020-08-07 00:59:00 -04:00
rusefi 0ebe7ba059 TS SD integration #1653 2020-08-06 22:05:26 -04:00
rusefi c55477bfa6 Stack usage is still all over the place #1662 2020-08-02 11:39:20 -04:00
Matthew Kennedy 3aa0606f46 don't use register keyword 2020-07-29 02:40:10 -07:00
Matthew Kennedy 9d3b7346e0 even more dead 2020-07-29 02:36:47 -07:00
Matthew Kennedy ea1f913c68 more dead 2020-07-29 02:34:30 -07:00
Matthew Kennedy 8929fe57c2 dead code 2020-07-29 02:32:48 -07:00
Matthew Kennedy ca29e0d342 now unused table 2020-07-21 00:07:49 -07:00
rusefi e8e43f5bef Stefan, I want to drink from the same fountain of patience 2020-07-12 15:00:44 -04:00
rusefi 2b32bc8c16 PidIndustrial does not limit iTerm fix #1599 2020-07-11 15:30:40 -04:00
rusefi 0f61795a54 PidIndustrial does not limit iTerm #1599 2020-07-11 15:05:18 -04:00
rusefi a1b9d58361 https://rusefi.com/forum/viewtopic.php?p=37401#p37401 2020-07-10 14:19:51 -04:00
rusefi 7b5f782e91 idle_min through FSIO not working as intended #1553
FSIO debug outputs progress
2020-07-04 21:32:12 -04:00
rusefi 63edde79d4 FATAL error: lsize mismatch 336/3342 #884 2020-07-04 00:31:29 -04:00
rusefi 23a29073b6 FATAL error: lsize mismatch 336/3342 #884 2020-07-04 00:02:27 -04:00
andreika-git 8b84243dae Gen config refactor 2 (#1560)
* gen_config refactor, part II

* short board defines

* oops

* comment & undef

* define QUOTE

Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2020-07-02 12:33:31 -04:00
rusefi eb3ff73c29 1 byte issue in TuneReadWriteTest fix #1512 2020-06-18 23:29:08 -04:00
rusefi 7f3ce36065 1 byte issue in TuneReadWriteTest #1512 2020-06-18 22:51:07 -04:00
rusefi 22314eee90 reducing constant dupliation 2020-05-31 13:40:48 -04:00
rusefi 804f4b9db5 better file name 2020-05-25 13:02:05 -04:00
rusefi 725978f0b3 funny that THIS would happen 2020-05-23 22:11:09 -04:00
Matthew Kennedy 6d4924e85a dead datalog code (#1439)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-16 00:11:52 -04:00
dron0gus ef60b90c49 Some bit, unaligned and different endian access helpers (#1436)
* util: add some common macros

* util: add unaligned access helpers
2020-05-15 15:55:06 -04:00
Matthew Kennedy 424a86be7b short term fuel trim: part 2 (#1405)
* add tooltip

* add other direction to deadband

* add impl

* test partitioning

* makefile

* wrong comment

* fix include
2020-05-07 08:52:32 -04:00
rusefi 7e817fb4fd steps towards tle8888 2020-05-06 19:15:52 -04:00
rusefi f7321942e9 class constructors are a great way to have simple initialization sequence 2020-05-03 11:49:06 -04:00
Matthew Kennedy 1cd939f6db actually use msg parameter (#1372) 2020-04-27 07:56:38 -04:00
Matthew Kennedy 738e53442d General purpose PWM: implementation & tests (#1366)
* config

* significant digits

* renumber enum, no need for a "none"

* ui

* impl base

* error handle MAP

* init & update

* don't need arg

* don't lie about sensor

* fix test build

* test stub

* initialize

* null check

* fix clamping

* test output

* types & enums

* don't need param

* test getOutput

* fix

* output pin instead of brain pin

* default config
2020-04-26 14:06:28 -04:00
Matthew Kennedy a8bf8a8eb5 types & enums (#1367) 2020-04-25 18:26:29 -04:00
rusefi 1bcbed3cb5 reducing code duplication 2020-04-20 15:57:03 -04:00
Matthew Kennedy d17afd3a63 ETB testing: output, position clamping (#1333)
* add clampf

* more tests

* public

* missed a mock

* fix output duty clamping

* do it that way

* more

* ah ha!

* test negative too

* clamp pedal

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-20 13:52:20 -04:00
Matthew Kennedy 830f03c003 Closed loop controller base & ETB testing (#1322)
* closed loop controller base

* etb tps test

* closed loop controller tests

* test support

* update gtest

* fix for change

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-19 17:18:47 -04:00
Matthew Kennedy f54db83d67 Improve unexpected (#1323)
* use type instead of value

* fix remaining initializer-list users

* impruv

* last consumer?

* consumer

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-19 08:37:43 -04:00
Matthew Kennedy 363f6d5110 add expected helper class (#1321)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-19 01:53:04 -04:00
Matthew Kennedy 24b0c85a9e fix warnings (#1282)
* warnings

* don't need to template those
2020-04-12 09:39:14 -04:00
rusefi 87fda825fc lib function by Dron0Gus 2020-04-06 11:29:40 -04:00
Matthew Kennedy 01c87a87ee Deadband helper & tests (#1267)
* deadband

* header

* comment
2020-04-06 09:16:26 -04:00
rusefi b40d4d588d code style 2020-04-01 21:32:21 -04:00
Matthew Kennedy cd41449459 Debuggability in the new sensor world (#1238)
* rename to avoid conflict

* fix efilib

* add sensor printing

* makefile

* that check was already there

* const

* const

* fix tests

* formatting

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-03-30 18:29:42 -04:00
Matthew Kennedy 8642a0a6c7 TS cleanup pass (#1225)
* remove biquad config

* fuel pump clarity

* one code usage

* minimal generate for ci

* and don't build it either

* remove commented out code
2020-03-25 23:00:17 -04:00
rusefi 2b06452aa5 fine 2020-03-24 16:46:36 -04:00
rusefi 1785517286 simpler API? 2020-03-24 02:33:20 -04:00
rusefi ce1a11ead5 code style 2020-03-23 00:00:11 -04:00
Matthew Kennedy f43042d61b const (#1193) 2020-03-18 21:55:46 -04:00
Matthew Kennedy ef0dfc6ec4 split out scaled channel header (#1156)
* split out scaled channel header

* update header
2020-02-24 16:47:10 -05:00
rusefi 6dd509a34b opening the door to boost controller! 2020-01-31 14:23:15 -05:00
rusefi 1735529a6b refactoring: extracting DEEP_IN_THE_PAST_SECONDS contant 2020-01-31 01:21:56 -05:00
rusefi d91a7a6a8f code style 2020-01-21 01:40:11 -05:00
Matthew Kennedy f8cd2ad3ce use NT_PER_SECOND instead of convert from microseconds (#1107)
* add NT_PER_SECOND

* missed a few

* inject tooth logger timestamp

* inject
2020-01-19 22:23:41 -05:00
rusefi a222ecdfe1 happy new year unification 2020-01-13 21:57:43 -05:00