Commit Graph

135 Commits

Author SHA1 Message Date
Andrey e1c41ff798 FATAL on NB2 tune jim stim input signal #2965 2021-07-14 16:03:00 -04:00
Andrey a57d7c48fb global static not good, there shall be only one god object /s 2021-06-23 06:10:27 -04:00
Matthew Kennedy 13f3d1e291
Fix multi bank fueling (#2661)
* add cylinder number

* changelog

* wording
2021-05-09 09:37:07 -04:00
Matthew Kennedy 3968204dfa
Hook up multi bank fuel trim (#2532)
* multi bank trim

* cleaning

* output channels

* output channels
2021-05-08 17:41:50 -04:00
Matthew Kennedy c26987b96b
Destroy all shared logger (#2574)
* most of shared logger

* a few more

* one more

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 14:28:48 -04:00
Matthew Kennedy ad71016862
rip the bandaid: find-replace most of scheduleMsg (#2572)
* biiiig find replace

* more trivial find replace

* pwm

* almost all of them

* few more

* gpio

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 12:53:13 -04:00
rusefillc 41804736e2 engine sniffer into unit tests 2021-04-04 22:41:38 -04:00
Matthew Kennedy 4e3e95db2d
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
Andrey G 89b631a794
Hip9011 and cleanups (#2477)
* hip9011: move hipCs out of EnginePins to hip9011 driver

* hip9011: cleanup debug output, save few RAM bytes

* Supress few signed vs unsigned warnings
2021-03-20 08:40:36 -04:00
Matthew Kennedy 650d148008
Usable fuel consumption data/gauges (#2474)
* fuel consumption

* gauge names

* consumers

* obd

* binary logging

* doesn't need explicit constructor

* getters

* it works

* correct for injections per cycle

* datalog

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-19 17:04:42 -04:00
Matthew Kennedy 5067b81fce
Compute injection duration later in the pipeline (#2175)
* injector model, test

* new math

* inject fuel based on new math

* tests

* fix

* it should work like this

* format

* update TPS AE even when we're cutting fuel

* comment

* conversion factor

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-03 07:30:56 -05:00
Matthew Kennedy 39884f8934
use DECLARE_ENGINE_PTR for Engine class (#2365)
* engine cleanup

* do the cleanup

* one last spot

* expand_engine noop for firmware

* simulator
2021-02-16 16:58:54 -05:00
rusefillc 2d99e77c95 M62T vanos support #2243 2021-02-08 21:50:31 -05:00
rusefi 6b10de5616 refactoring: naming consistency 2021-02-08 18:20:53 -05:00
Matthew Kennedy 93b034b8e9
Limp handles inj/ign disable (#2245)
* status loop just asks limp mgr

* put logic in limp manager

* don't need that function any more

* bye

* TIL these bits already exist in the configuration
2021-01-27 21:28:53 -05:00
Andrey G 2af32084f4
gpio helper (#2195)
* gpios: isBrainPinValid helper

* LCD HD44780: do not touch pins if DM_NONE or invalid gpio

* Fix isEnabled checks for GPS and Joystick

* LCD HD44780: writePad use this method wider
2021-01-08 20:01:26 -05:00
Andrey G b92e3086d0
Adc isAdcChannelValid helper (#2188)
* Guard define argument

* ADC: isAdcChannelValid

Check for both <= EFI_ADC_NONE and >= EFI_ADC_LAST_CHANNEL
Also check for value out of enum range (corrupted settings)

* Fix unit tests
2021-01-05 16:02:20 -05:00
Matthew Kennedy ff4ce2fb1f
create limp manager (#2142)
* move rev limit to limp manager

* call fatal error

* include order

* fix bug

* tests

* comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-26 17:30:46 -05:00
rusefillc c36f76b68e Fuel pump should turn on at the first sign of engine rotation #1961 2020-12-02 23:09:39 -05:00
rusefillc 9045470fc6 avoid float -> int64 conversion #1977
cherry picking...
2020-11-23 23:53:25 -05:00
Matthew Kennedy 55379463c0
remove (#1985) 2020-11-23 20:10:17 -05:00
rusefillc 96a126d60f 60/2 perf grab #1850
unused parameter
2020-10-04 02:09:12 -04:00
rusefillc 030ec42ac7 60/2 perf grab #1850
a) removing more of stack validating - one validation within the deepest method would be enough

b) un-wrapping main callback loop for explicit order of execution
2020-10-04 01:43:02 -04:00
rusefillc 6b95579706 60/2 perf grab #1850 2020-10-04 01:26:29 -04:00
rusefillc c9d3d1f01a 60/2 perf grab #1850 2020-10-04 01:04:15 -04:00
shadowm60 8d8e8ec260
Launch control - experimental (#1816)
* Update tachometer.cpp

Initial implementation of E30 M3 Tach output solution #907, unit_test plus debugging next

* tacho unit tests

First successfull unit test for tachometer

* RAM adjustment so it would link

* refactoring tacho, broken!

* starting to make some progress...still fails after a few seconds

* Rework with SW PWM

* Update after code review

* unit_test update

* First working unit_test

* Update .gitignore

* Update engine_controller.cpp

* Update engine_controller.cpp

* Update tachometer.h

* Update test_tacho.cpp

* Switched UART DMA on

* Revert "Switched UART DMA on"

This reverts commit 4a23974c431e0e7fd760595d2161e74e6854897e.

* enable launch control

make use of already existent code + integration

* Delete compile_frankenso_all.sh

remove it since it is not part of the project

* Update main_trigger_callback.cpp

broke unit_Tests

Co-authored-by: rusefi <rusefi@users.noreply.github.com>
2020-09-22 16:25:27 -04:00
rusefi 1657e499ce better QC procedure 2020-09-19 04:39:32 -04:00
Matthew Kennedy 95798a5246
fix broken master, inject engine ptr to rpmcalculator (#1759)
* fix

* oops
2020-09-05 18:49:42 -04:00
rusefi ca21d5b4c2 refactoring 2020-09-03 19:29:15 -04:00
rusefi c32c8d715d A vague bug #1684 2020-08-08 20:57:42 -04:00
rusefi 1ba4dd0dcc A vague bug #1684 2020-08-08 20:36:16 -04:00
Matthew Kennedy 5b99fdf3df deprecate 2020-07-28 12:13:55 -07:00
Matthew Kennedy 626f55a08a refacto 2020-07-24 18:26:24 -07:00
Matthew Kennedy 131f4c4e8f Merge remote-tracking branch 'upstream/master' into reset-overlap 2020-07-20 18:43:17 -07:00
rusefi 48cc155144 changing crazy in composite logger 2020-07-20 21:20:58 -04:00
Matthew Kennedy dc05efef61 Merge remote-tracking branch 'upstream/master' into reset-overlap 2020-07-20 14:53:59 -07:00
rusefi c34a0d95d7 unit test framework improvements for smoother event execution 2020-07-20 17:13:33 -04:00
Matthew Kennedy 8b0d6a26cf Merge remote-tracking branch 'upstream/master' into reset-overlap 2020-07-20 13:27:51 -07:00
rusefillc d85e98d1f7
Merge pull request #1622 from mck1117/encapsulate-wwae
put wall wetting inside InjectionEvent
2020-07-20 14:19:57 -04:00
rusefi d52fb0b168 better unit test logging 2020-07-20 13:38:33 -04:00
Matthew Kennedy a7d0678092 Merge remote-tracking branch 'origin/master' into reset-overlap 2020-07-20 00:07:04 -07:00
Matthew Kennedy 46b7567195 put wall wetting inside 2020-07-20 00:04:05 -07:00
rusefi f37e739438 logicdata into unit tests 2020-07-19 22:03:30 -04:00
Matthew Kennedy 428f2fe247 Merge remote-tracking branch 'upstream/master' into reset-overlap 2020-07-19 13:52:45 -07:00
Matthew Kennedy 94635f9f33
encapsulate (#1617) 2020-07-19 16:46:28 -04:00
rusefi b7109fa09c better unit test logging 2020-07-19 16:05:19 -04:00
rusefi 49e9e08c65 better unit test logging 2020-07-19 15:47:21 -04:00
rusefi 222655517b better unit test logging 2020-07-19 15:25:49 -04:00
rusefi dd3a080d88 better unit test logging 2020-07-19 14:26:28 -04:00
rusefi fbfef8290c better unit test logging 2020-07-19 14:17:15 -04:00
rusefi 5a10e8adac better unit test logging 2020-07-19 14:13:15 -04:00
Matthew Kennedy 77294ae542 encapsulate overlap logic 2020-07-18 23:03:12 -07:00
rusefi 0b5bb7c0cf useFSIO6ForRevLimiter 2020-06-01 09:09:55 -04:00
Matthew Kennedy d24b5d5e93
Integrate stft (#1475)
* code changes

* missed a spot

* update UI

* gauge name

* adjust gauge scaling

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-31 16:59:05 -04:00
rusefi 5d75c36651 composite log for console 2020-05-26 00:07:18 -04:00
Matthew Kennedy 8dadb554c4
as suggested by the comment, this doesn't need a warning (#1464)
* the comment is correct

* format
2020-05-23 00:40:20 -04:00
Matthew Kennedy e46d9f0c99
Fix 100% duty injection (#1431)
* skip turn-off for high duty

* mock executor injection

* test

* switch to hard cut

* test no longer relevant
2020-05-14 07:44:32 -04:00
rusefi 88bbbb6c33 VVT miata trying to crank with random phase #1278 2020-04-26 20:50:49 -04:00
Matthew Kennedy 4d24fdd57d
Fuel/ign correctino on new temp sensors (#1318)
* corrections

* test

* adv map

* tests

* cleanup

* lcd

* fsio

* unneeded

* more math

* last consumer

* cleanup

* fix kinetis
2020-04-18 18:45:30 -04:00
Matthew Kennedy ff867b9301
fix warnings (#1282)
* warnings

* don't need to template those
2020-04-12 09:39:14 -04:00
Matthew Kennedy 7d5df29fbd
yet more tps consumers (#1258)
* advance_map

* tests

* unneeded

* idle

* use driver intent instead

* and obd and lcd

* engine load

* ve lookup

* unused

* oops we needed that

* oops needed that too

* mocking

* test mocks

* oops

* helps to use the right sensor

* and cylinder cleanup

* fuel math

* typo

* old tests

* kill dead stuff

* cleanup

* more

* fix

* test

* s

* fix signature

* fix test

* comment

* priming pulse

* remove mock tps

* remove more dead

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-05 09:11:25 -04:00
Matthew Kennedy 8fd9842310
cleanup extern mess (#1237)
* cleanup

* move outside define
2020-03-29 19:06:03 -04:00
Matthew Kennedy 2c809e4475
Remove old monitoring timestamps (#1217)
* remove monitoring timestamps

* adv map

* fuel calc

* map avg

* printing

* spark logic

* hip 9011

* new traces

* s

* missed a few
2020-03-24 20:19:19 -04:00
rusefi 165160bb40 random header clean-up 2020-03-23 09:00:57 -04:00
Matthew Kennedy 4740f525ee
save some ram (#1211)
* remove dead stuff

* why store those pointers twice?
2020-03-22 19:06:29 -04:00
Matthew Kennedy 7682192c2b
Simplify fuel math again (#1117)
* return the scheduled time from scheduleByAngle

* simplify fueling math
2020-02-01 17:29:55 -05:00
Matthew Kennedy 103e51dd85 Inject timestamps for injection too (#1108)
* schedule by nt, not us

* inject timestamp
2020-01-20 00:12:18 -05:00
Matthew Kennedy dd3ded37f4 injector logic simplification (#1095)
* simplify injector scheduling a little

* clearer logic

* comment
2020-01-11 10:26:20 +03:00
rusefi 67377abdea better method name 2020-01-10 23:45:01 -05:00
rusefi 03a48455ed fear he who sees dead code: 'overlappingScheduleOffTime' was never assigned so the whole logic around it is dead 2020-01-10 23:39:30 -05:00
rusefi b7951e1e70 Merge branch 'master' of https://github.com/rusefi/rusefi
# Conflicts:
#	firmware/controllers/engine_cycle/main_trigger_callback.cpp
2020-01-10 23:19:30 -05:00
rusefi 645f51a038 better method names 2020-01-10 23:17:58 -05:00
rusefi b022f431e2 better method name 2020-01-10 23:09:38 -05:00
Matthew Kennedy 68813cda65 Dedupe (#1094)
* deduplicate

* yeah, the compiler is smart enough
2020-01-11 06:29:42 +03:00
Matthew Kennedy e25a93415f Schedule sparks with scheduleByAngle (#1092)
* injection

* injectors

* add edge timestamp to ShaftPositionListener

* scheduleByAngle require edgeTimestamp

* schedule with nt not us

* fix all schedulers

* schedule spark based on edge timestamp

* aux valves too

* update comments

* schedule dwell with new stamp

* format
2020-01-11 00:01:54 +03:00
Matthew Kennedy a6a1335adb Require tooth reference time for scheduleByAngle (#1091)
* injection

* injectors

* add edge timestamp to ShaftPositionListener

* scheduleByAngle require edgeTimestamp

* schedule with nt not us

* oops, these were missing from this branch
2020-01-09 23:45:13 +03:00
rusefi b83a5310be happy new year 2020-01-08 00:02:40 -05:00
Matthew Kennedy 95a7a9a8e1 Strongly typed action constructor (#1087)
* strong typing

* maybe we needed that one
2020-01-07 18:10:31 -05:00
Matthew Kennedy 5c85d53e16 Pass action_s instead of callback/param (#1084)
* change action

* consumers

* fix test

* didn't mean to add those

* simplify

* fix simulator

* fix sim for real

* oy

* maybe this time the simulator will actually be fixed, for real

* don't rely on undefined behavior
2020-01-07 00:41:18 -05:00
rusefi cc466ad3ef de-coupling things a bit 2019-12-24 00:26:23 -05:00
rusefi 537a95a9b4 removing legacy perf code 2019-12-23 21:56:16 -05:00
rusefi 84e732846b replacing probably unused engineSnifferHisto with new perf_trace 2019-12-23 20:22:17 -05:00
rusefi ff9383eea1 fixing build is my most favourite time! 2019-12-13 20:51:04 -05:00
rusefi af4f20551b getting rid of boardConfiguration / binary compatible change 2019-12-11 17:48:55 -05:00
rusefi 62481d7fe8 The Big Refactoring of 2019: folder structure #723 2019-12-08 13:21:35 -05:00