Commit Graph

24 Commits

Author SHA1 Message Date
Matthew Kennedy a8eddbccf6
perform extra-step-prevention in the stepper driver itself (#3038)
* perform extra-step-prevention in the stepper driver itself

* isBusy flag

* I am unable to type

* the court of public opinion has decided that greater-equal is correct

* that sets target in steps, not percent

* correct var name

* mock stepper motor

* testable stepper

* build is happy

* helping build
2021-08-02 07:03:57 -04:00
Andrey e1c41ff798 FATAL on NB2 tune jim stim input signal #2965 2021-07-14 16:03:00 -04:00
Matthew Kennedy 1bca4843fe
test dc_motor.cpp (#2890)
* use ipwm where possible

* mock ipwm

* initialize

* test
2021-07-01 09:21:18 -04:00
Matthew Kennedy c171d5f1d3
not const getAirmass (#2883)
* not const

* test
2021-07-01 00:05:42 -04:00
Matthew Kennedy b398d03f5f
rewrite table3d (#2723)
* post cranking factor limits

* sensible defaults

* but not for tests

* add pointer version of get bin

* test via map3d

* put that back for a minute

* new impl

* fix order

* rename and fix table orientation

* flip the table to the correct orientation

* dead cleanup, rename

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-05-20 22:31:16 +03:00
Matthew Kennedy 1d10fbc7a8
const airmass (#2694) 2021-05-14 07:17:22 -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
rusefillc 9b4a1fff7b clang warnings again #2055 2020-12-11 10:33:00 -05:00
Matthew Kennedy bad0e6b949
require redundant TPS for ETB (#2041)
* Require redundant tps for ETB (#2037)

* mod sensor api

* require redundancy

* fix tests

* check that it fails

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>

* add a test that fails but should not

* fix the bug

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-08 06:24:20 -05:00
rusefi 2a1b585bfe Revert "Revert "Split ETB in to interface + implementation headers (#2040)""
This reverts commit 4f4bb957
2020-12-07 01:27:27 -05:00
rusefi 4f4bb95770 Revert "Split ETB in to interface + implementation headers (#2040)"
This reverts commit d9a82c09
2020-12-07 01:11:19 -05:00
Matthew Kennedy d9a82c09af
Split ETB in to interface + implementation headers (#2040)
* split etb interface

* mocks

* fix master while we're at it

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-07 00:29:09 -05:00
Matthew Kennedy 42bfad807b
Etb wastegate hookup (#1888)
* remove

* cleanup

* implement ETB parts

* hook up to boost controller

* tests
2020-10-18 21:57:04 -04:00
Matthew Kennedy f1c04efefa
replace ETB index with function enum (#1807)
* two throttles one thread

* look at all this RAM!

* add enum

* switch from index to function

* test fixup

* improve init logic

* remove old vw idle mode bit
2020-09-28 16:33:07 -04:00
Matthew Kennedy 1fc55da3ca
two throttles one thread (#1806)
* two throttles one thread

* look at all this RAM!
2020-09-18 13:47:49 -04:00
Matthew Kennedy 53b864bdda fixing 2020-07-28 12:11:56 -07:00
Matthew Kennedy 42c6a641ad add mock 2020-07-26 20:35:36 -07:00
Matthew Kennedy ed14758c63 mocks 2020-07-26 03:18:26 -07:00
Matthew Kennedy b906d12268
Fix gppwm properly (#1487)
* directly control output in onoff mode

* test fixing
2020-06-11 20:43:26 -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
Matthew Kennedy ba6ec4ac51
TPS Auto Calibration with ETB (#1382)
* switch to thread

* actually use default frequency define

* crank ADC too

* make space in RAM

* remove TS field

* this should work for test

* auto cal

* wire up bench testing

* s

* fix

* rearrange a bit

* inject

* remove unused bit

* mock repair

* guard for ECUs without ETB
2020-04-28 19:31:41 -04:00
Matthew Kennedy fe4b531aeb
Move ETB control to a thread (#1374)
* switch to thread

* actually use default frequency define

* crank ADC too

* make space in RAM

* remove TS field

* this should work for test

* fix dt

* re-resize ram
2020-04-28 07:22:31 -04:00
Matthew Kennedy f128b33694
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 1a5e0a42f8
Inject idle to ETB (#1335)
* inject idle position

* pointer

* etb idle tests

* extract mocks

* ops

* test negative case too

* don't convert for etb

* guard
2020-04-20 16:26:35 -04:00